GithubHelp home page GithubHelp logo

junfenglx / reasoning_attention Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 13.0 96.79 MB

Unofficial implementation algorithms of attention models on SNLI dataset

Python 56.13% Jupyter Notebook 43.80% Shell 0.07%
attention attention-model lasagne snli

reasoning_attention's People

Contributors

junfenglx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

reasoning_attention's Issues

snli_match_lstm_predict.py

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?

error while running snli_match_lstm.py

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.')

END OR ERROR MESSAGE

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.