Decomposable-Attention
Decomposable-Attention copied to clipboard
error
Hi Thank you for sharing this code when I run the code I got this error
While running python3 Train.py, I am getting the following error:
Start training and evaluating ... Epoch : 1 Traceback (most recent call last): File "Train.py", line 164, in train() File "Train.py", line 93, in train _, batch_loss, batch_acc = sess.run([model.train, model.loss, model.acc], feed_dict=feed_dict)
Traceback (most recent call last):
File "/home/nujud/Desktop/code/Decomposable-Attention-master/Train.py", line 166, in
please help Thank you in advance
Looking forward for your reply. Thanks,
There seems to be an error in either how the masking array is being built (the shape yielded by the sentences2Index() method in Utils.py is not congruent with the shape initialized in the Decomposable model in Model.py) or how the masking array is being initialized in the first place. I've tried reshaping to get (,100) instead but there are some mask arrays that have less than 100 elements, therefore I just used a try except block to check how many erroneous ones were being produced, and another try except block on the evaluate method() in Train.py to skip the arrays that did not fit.
if you have managed to solve the problem and run the full code please let me know
Couldn't solve this problem, but found the original code that this repo may have been based from and this one works perfectly: https://github.com/cxncu001/NLI
Returning s1MaskList and s2MaskList instead of s1Mask and s2Mask, respectively, in the sentence2Index function seems to work.
thanks @voidcentury and @thefirebanks for great supports