-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add modeling layer of BiDAF #11
base: bidaf
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
def __init__(self, prefix=None, params=None): | ||
super(BiDAFModelingLayer, self).__init__(prefix=prefix, params=params) | ||
|
||
self._modeling_layer = LSTM(hidden_size=100, num_layers=2, bidirectional=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you specify the input_size to be 8*hidden_size=800, and add description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you specify the dropout=0.2 according to the paper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you set hidden_size=input_dim, and num_layer=nlayers, bidirectional=biflag
? It will be more general.
|
||
layer = BiDAFModelingLayer() | ||
# The model doesn't need to know the hidden states, so I don't hold variables for the states | ||
layer.initialize(init.Xavier(magnitude=2.24)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the default layer.initialize()
which is default by Uniform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Add modeling layer of BiDAF: just 2-layer bi-LSTM and mimic data input from attention flow.
Checklist
Essentials
Changes