asiddhant / Active-NLP

Bayesian Deep Active Learning for Natural Language Processing Tasks
147 stars 29 forks source link

Error in CNN_CNN_LSTM #8

Open pverma3 opened 4 years ago

pverma3 commented 4 years ago

Hi,

When I run CNN_CNN_LSTM I get matrix mismatch error. Was wondering if you could have any pointers?

Traceback (most recent call last): File "/home/prateek.verma/remote_ner/active_ner.py", line 318, in eval_test_train=False, plot_every = acq_plot_every, lr_decay = 0.05) File "/home/prateek.verma/remote_ner/neural_ner/util/trainer.py", line 76, in train_model score = self.model(words, tags, chars, caps, wordslen, charslen, mask, n_batches) File "/opt/conda/envs/py27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, kwargs) File "/home/prateek.verma/remote_ner/neural_ner/models/cnn_cnn_lstm.py", line 72, in forward loss = self.decoder(new_word_features, tags, tagsmask, usecuda=usecuda) File "/opt/conda/envs/py27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, *kwargs) File "/home/prateek.verma/remote_ner/neural_ner/modules/DecoderRNN.py", line 66, in forward usecuda=usecuda) File "/home/prateek.verma/remote_ner/neural_ner/modules/DecoderRNN.py", line 41, in forward_step output = self.linear(output.squeeze(0)) File "/opt/conda/envs/py27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(input, kwargs) File "/opt/conda/envs/py27/lib/python2.7/site-packages/torch/nn/modules/linear.py", line 87, in forward return F.linear(input, self.weight, self.bias) File "/opt/conda/envs/py27/lib/python2.7/site-packages/torch/nn/functional.py", line 1370, in linear ret = torch.addmm(bias, input, weight.t()) RuntimeError: size mismatch, m1: [2 x 50], m2: [350 x 19] at /opt/conda/conda-bld/pytorch_1579022021485/work/aten/src/THC/generic/THCTensorMathBlas.cu:290

isdhall commented 1 year ago

Hello, did you find a solution to this?