Giter Site home page Giter Site logo

jonzarecki / lstm-sentence-similarity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aditya1503/siamese-lstm

5.0 5.0 1.0 9.82 MB

Theano implementation of siamese LSTMs for evaluating semantic similarity between sentences.

Python 0.36% OpenEdge ABL 99.64%
lstm nlp sentence-similarity siamese-lstm theano

lstm-sentence-similarity's People

Contributors

aditya1503 avatar jonzarecki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

robspringles

lstm-sentence-similarity's Issues

About saving model

your model saves training results using example3.py
but unfortunately, when it reloads the saved pickle file it doesnot execute like it does for bestsem.p
it could not find keys() . kindly help me in this regard that how may i save the newly learnt weights

problem when lstm constructor loads

hello!
while trying to start training .getting this error

pdb> > /home/seemab/seemab/Siamese-LSTM-master/lstmQA.py(191)adadelta()
189 for rg2, g in zip(running_grads2, grads)]
190
7-> 191 f_grad_shared = theano.function([emb11,mask11,emb21,mask21,y], cost, updates=zgup + rg2up,
192 name='adadelta_f_grad_shared',allow_input_downcast=True)
193

ipdb>
ipdb> Traceback (most recent call last):

File "", line 1, in
debugfile('/home/seemab/seemab/Siamese-LSTM-master/trainQA.py', wdir='/home/seemab/seemab/Siamese-LSTM-master')

File "/home/seemab/.local/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 728, in debugfile
debugger.run("runfile(%r, args=%r, wdir=%r)" % (filename, args, wdir))

File "/home/seemab/anaconda2/lib/python2.7/bdb.py", line 400, in run
exec cmd in globals, locals

File "", line 1, in

File "/home/seemab/.local/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)

File "/home/seemab/.local/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)

File "/home/seemab/seemab/Siamese-LSTM-master/trainQA.py", line 14, in
sls=lstm("new.p",load=False,training=True) #call to class lstm()

File "lstmQA.py", line 303, in init
self.f_grad_shared, self.f_update = adadelta(lr, tnewp, grads,emb11,mask11,emb21,mask21,y, cost)

File "lstmQA.py", line 192, in adadelta
name='adadelta_f_grad_shared',allow_input_downcast=True)

File "/home/seemab/anaconda2/lib/python2.7/site-packages/theano/compile/function.py", line 298, in function
output_keys=output_keys)

File "/home/seemab/anaconda2/lib/python2.7/site-packages/theano/compile/pfunc.py", line 449, in pfunc
no_default_updates=no_default_updates)

File "/home/seemab/anaconda2/lib/python2.7/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=1lstm1_U_rgrad2, 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.')

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.