You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 32 and 1 in dimension 0 at /pytorch/aten/src/TH/generic/THTensor.cpp:689
#12
Open
devdev999 opened this issue
Oct 24, 2019
· 0 comments
Have attached traceback, am not sure what is calling this error.
Traceback (most recent call last):
File "train.py", line 283, in
train(opt)
File "train.py", line 173, in train
out = model(fc_feats, att_feats, labels, sen_embed)
File "/im2p/im2penv/lib/python2.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/im2p/GoodNews-master/models/OldModel.py", line 100, in forward
else: output, state = self.core(xt, fc_feats, att_feats, state, sen_embed)
File "/im2p/im2penv/lib/python2.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/im2p/GoodNews-master/models/OldModel.py", line 398, in forward
output, state = self.rnn(torch.cat([xt, att_res, att_res_sen.float()], 1).unsqueeze(0), state)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 32 and 1 in dimension 0 at /pytorch/aten/src/TH/generic/THTensor.cpp:689
Closing remaining open files:./data/data_news_image.h5...done./data/data_news_label.h5...done
The text was updated successfully, but these errors were encountered:
Have attached traceback, am not sure what is calling this error.
Traceback (most recent call last):
File "train.py", line 283, in
train(opt)
File "train.py", line 173, in train
out = model(fc_feats, att_feats, labels, sen_embed)
File "/im2p/im2penv/lib/python2.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/im2p/GoodNews-master/models/OldModel.py", line 100, in forward
else: output, state = self.core(xt, fc_feats, att_feats, state, sen_embed)
File "/im2p/im2penv/lib/python2.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/im2p/GoodNews-master/models/OldModel.py", line 398, in forward
output, state = self.rnn(torch.cat([xt, att_res, att_res_sen.float()], 1).unsqueeze(0), state)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 32 and 1 in dimension 0 at /pytorch/aten/src/TH/generic/THTensor.cpp:689
Closing remaining open files:./data/data_news_image.h5...done./data/data_news_label.h5...done
The text was updated successfully, but these errors were encountered: