Giter Club home page Giter Club logo

Comments (5)

OlavHN avatar OlavHN commented on August 21, 2024

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.

OlavHN avatar OlavHN commented on August 21, 2024

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.

carlthome avatar carlthome commented on August 21, 2024

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.

carlthome avatar carlthome commented on August 21, 2024

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.

carlthome avatar carlthome commented on August 21, 2024

Uh, which kinda answers my own question. Closing. 🎉

from bnlstm.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.