ryankiros / layer-norm Goto Github PK
View Code? Open in Web Editor NEWCode and models from the paper "Layer Normalization"
Code and models from the paper "Layer Normalization"
Hi Jimmy and Ryan,
I found a discrepancy between the implementations in layers.py and torch_modules/LSTM_LN.lua.
There are three LN applied in each LSTM step in layers.py while there remains only one in the torch one. Is there a purpose for doing this?
Best,
Jake
I got the following error while following step 4 in the training directory, using the pretrained model downloaded from the README file.
>>> import tools
>>> embed_map = tools.load_googlenews_vectors()
>>> model = tools.load_model(embed_map)
Loading dictionary...
Creating inverted dictionary...
Loading model options...
Loading model parameters...
Compiling encoder...
/share/data/speech/zewei/anaconda3/envs/senteval/lib/python2.7/site-packages/theano/scan_module/scan.py:1017: Warning: In the strict mode, all neccessary shared variables must be passed as a part of non_sequences
'must be passed as a part of non_sequences', Warning)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "tools.py", line 62, in load_model
trng, x, x_mask, ctx, emb = build_encoder(tparams, options)
File "model.py", line 147, in build_encoder
mask=x_mask)
File "layers.py", line 249, in lngru_layer
strict=True)
File "/share/data/speech/zewei/anaconda3/envs/senteval/lib/python2.7/site-packages/theano/scan_module/scan.py", line 1042, in scan
scan_outs = local_op(*scan_inputs)
File "/share/data/speech/zewei/anaconda3/envs/senteval/lib/python2.7/site-packages/theano/gof/op.py", line 507, in __call__
node = self.make_node(*inputs, **kwargs)
File "/share/data/speech/zewei/anaconda3/envs/senteval/lib/python2.7/site-packages/theano/scan_module/scan_op.py", line 374, in make_node
inner_sitsot_out.type.dtype))
ValueError: When compiling the inner function of scan the following error has been encountered: The initial state (`outputs_info` in scan nomenclature) of variable IncSubtensor{Set;:int64:}.0 (argument number 3) has dtype float32, while the result of the inner function (`fn`) has dtype float64. This can happen if the inner function of scan results in an upcast or downcast.
Hi,
From the paper "layer normalization", in section 3.1, layer normalization for rnn is used for the sum of the weighted input and weighted hidden. In the code of lngru, it seems ln is only applied to the weighted hidden instead of the sum?
Is there anything particular about this?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.