Comments (5)
The input and hidden states maybe different sizes, yes, but it would still be possible to have a single weight matrix of shape (x + h, 4h).
Note that the W_hh is initialized with the identity for a quarter of its weights. So that initializer would have to be a bit more complicated.
I remember them keeping the two batch norms separate in the paper, however by slicing the resulting matrix I think that would still be possible with your proposed optimization.
from bnlstm.
I see now that the pr by hardmaru actually concatenated the two weight matrices before the matmul for the vanilla lstm, thus keeping the initializers as they are. Same approach could work for the bnlstm.
from bnlstm.
Concatenating would be neat for performance then. 👍
Yeah, I saw that you're using the identity for the input gate. I guess that's the fixed initialization proposed by Tim Cooijman?
from bnlstm.
Thinking about this a little more. Actually, slicing would not work. There has to be two matrix multiplications if batch norm is supposed to be applied afterwards on both terms separately.
from bnlstm.
Uh, which kinda answers my own question. Closing. 🎉
from bnlstm.
Related Issues (13)
- Tensorflow contrib function
- some error on tensorflow 1.8.0 HOT 1
- Update for tensorflow 1.12.0 HOT 2
- Bug report
- Type mismatch error while running test.py for tensorflow 1.13.1
- Applying bnlstm for video dataset
- BN on test set HOT 5
- BN in cell upate HOT 1
- bn_lstm_identity_initializer vs orthogonal_initializer discrepancy HOT 4
- Unique population statistics for each time step? HOT 1
- Terrible results on mnist with bn-lstm, why?
- Something about your update part HOT 1
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 bnlstm.