Comments (2)
Hi, it's been a while since I last worked with this, so I'm going from memory without guarantee that what I'm saying is correct.
Regarding the mask: if I remember correctly using the mask didn't improve the final performance, so I removed it to reduce overhead.
Regarding the control unit: the previous control is never used because the control unit uses different parameters for each step (question = self.control_input_u[step](question)
uses different parameters depending on the step value). Regarding question_lengths and mask see my previous remark.
from pytorch-mac-network.
Thanks for your feedback! I actually looked into the codes more carefully in the past few days.
If I may, I guess the reason that masking is not helpful is because you used 1e-30
rather than -1e30
in L48. The point is to make the token positions extremely small so they are equivalent to 0 after softmax. But now the value is just too small to have any impact. In original MAC implementation they choose -1e30
.
pytorch-mac-network/code/mac.py
Lines 43 to 48 in 15a65d1
Regarding the control unit, I think original paper may have a variation of non-recurrent version, which is like what you did here. But the one published in the paper actually combines previous control with the current control, before feeding into the next step. So it's actually used.
https://github.com/stanfordnlp/mac-network/blob/f6b665a56ea829364351616edcdc744979fc3b06/mac_cell.py#L142-L146
Anyway, thanks a lot for sharing this awesome implementations and for answering my questions! Greatly appreciated.
from pytorch-mac-network.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-mac-network.