Giter Club home page Giter Club logo

Comments (3)

ematvey avatar ematvey commented on July 30, 2024

AFAIR Cell is/was a template/factory, not a layer or parameter container

from hierarchical-attention-networks.

ksingla025 avatar ksingla025 commented on July 30, 2024

I think I am getting you. BNLSTMCell is just a declaration of a class. Still when you say call BNLSTMCell.call(), it will still call same set of parameters which are already defined in the graph at word level as they fall in same namescope of defined parameters. So treated as one unique set of parameters, not two (word and sentence).

I am seeing a big performance difference by making this change. ( i am trying in a little more complex problem of multi-class multi-label )

cell_word = BNLSTMCell(40, is_training) # h-h batchnorm LSTMCell
cell = GRUCell(30)
cell_word = MultiRNNCell([cell]*5)

cell_sent = BNLSTMCell(40, is_training) # h-h batchnorm LSTMCell
cell = GRUCell(30)
cell_sent = MultiRNNCell([cell]*5)

Similarly if you expect a different cell for forward and backward then you should define two more cells.

please correct me if I am wrong.

Other small side thing, according to my understanding, it's a general practice to not to dropout at eval time but it's happening as defined in the code here.

from hierarchical-attention-networks.

ematvey avatar ematvey commented on July 30, 2024

You might be right, my memory of TF's conventions is quite vague at this point.

from hierarchical-attention-networks.

Related Issues (20)

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.