aditya1503 / Siamese-LSTM

Siamese Recurrent Neural network with LSTM for evaluating semantic similarity between sentences.
200 stars 68 forks source link

please give a solution #15

Open komala1234 opened 7 years ago

komala1234 commented 7 years ago

while running the code i'm getting the following errors ..can anyone suggest me what changes i need to do..

Loading Word2Vec Traceback (most recent call last): File "/home/mcis-lap-40/Downloads/Siamese-LSTM-master/main.py", line 5, in sls=lstm("bestsem.p",load=True,training=True) File "/home/mcis-lap-40/Downloads/Siamese-LSTM-master/lstm.py", line 299, in init self.f_grad_shared, self.f_update = adadelta(lr, tnewp, grads,emb11,mask11,emb21,mask21,y, cost) File "/home/mcis-lap-40/Downloads/Siamese-LSTM-master/lstm.py", line 188, in adadelta name='adadelta_f_grad_shared') File "/usr/local/lib/python2.7/dist-packages/theano/compile/function.py", line 326, in function output_keys=output_keys) File "/usr/local/lib/python2.7/dist-packages/theano/compile/pfunc.py", line 449, in pfunc no_default_updates=no_default_updates) File "/usr/local/lib/python2.7/dist-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.')

Process finished with exit code 1