junfenglx / reasoning_attention Goto Github PK
View Code? Open in Web Editor NEWUnofficial implementation algorithms of attention models on SNLI dataset
Unofficial implementation algorithms of attention models on SNLI dataset
where did you use word2vector?Out-of-vocabulary words on the test corpus are set to fixed random vectors in the paper.but, in the"snli_match_lstm_predict.py",you use "print('Warning: {} not in dictionary'.format(w))" to handle the oov.why?
Hi, I am not able to run the command
python ./snli_match_lstm.py
I created a python3.5 environment with anaconda, where I installed the Bleeding-edge version of Theano/Lasagne with
pip install --upgrade https://github.com/Theano/Theano/archive/master.zip
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
The following error message is depicted:
(py35)user1@machine:~/matchLSTM$ python ./snli_match_lstm.py
Loading data ...
Loading train ...
550152
550149
549364
Loading dev ...
10000
10000
9842
Loading test ...
10000
10000
9824
num_epochs: 20
k: 300
batch_size: 30
display_frequency: 100
save_frequency: 1000
load previous: False
Building network ...
unchanged_W.shape: (34283, 300)
oov_in_train_W.shape: (9166, 300)
apply dropout mask id 140482817419472 to embedding matrix ...
dropout rate is 0.3
input var is hypo_var
apply dropout mask id 140482817419472 to embedding matrix ...
dropout rate is 0.3
input var is premise_var
Computing updates ...
Compiling functions ...
Traceback (most recent call last):
File "/home/user1/anaconda2/envs/py35/lib/python3.5/site-packages/theano/compile/pfunc.py", line 193, in rebuild_collect_shared
allow_convert=False)
File "/home/user1/anaconda2/envs/py35/lib/python3.5/site-packages/theano/tensor/type.py", line 234, in filter_variable
self=self))
TypeError: Cannot convert Type TensorType(float64, matrix) (of Variable Elemwise{add,no_inplace}.0) into Type TensorType(float32, matrix). You can try to manually convert Elemwise{add,no_inplace}.0 into a TensorType(float32, matrix).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./snli_match_lstm.py", line 325, in
main(num_epochs=20, batch_size=30, load_previous=False)
File "./snli_match_lstm.py", line 213, in main
cost, updates=updates)
File "/home/user1/anaconda2/envs/py35/lib/python3.5/site-packages/theano/compile/function.py", line 326, in function
output_keys=output_keys)
File "/home/user1/anaconda2/envs/py35/lib/python3.5/site-packages/theano/compile/pfunc.py", line 447, in pfunc
no_default_updates=no_default_updates)
File "/home/user1/anaconda2/envs/py35/lib/python3.5/site-packages/theano/compile/pfunc.py", line 208, in rebuild_collect_shared
raise TypeError(err_msg, err_sug)
TypeError: ('An update must have the same type as the original shared variable (shared_var=<TensorType(float32, matrix)>, shared_var.type=TensorType(float32, matrix), update_val=Elemwise{add,no_inplace}.0, update_val.type=TensorType(float64, matrix)).', 'If the difference is related to the broadcast pattern, you can call the tensor.unbroadcast(var, axis_to_unbroadcast[, ...]) function to remove broadcastable dimensions.')
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.