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
{{ message }}
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
I use the infersent to train my corpus but got different shape while decode, I donnt know why.
VALIDATION : Epoch 1 Traceback (most recent call last): File "train_entail.py", line 319, in <module> eval_acc = evaluate(epoch, 'valid') File "train_entail.py", line 276, in evaluate output = nli_net((s1_batch, s1_len), (s2_batch, s2_len)) File "/data2/sda/jiaxin_hu/git_project/lib/python3.5/site-packages/torch/nn/modules/module.py", line 489, in __call__ result = self.forward(*input, **kwargs) File "/data2/sde/jiaxin_hu/git_project/InferSent/models.py", line 1036, in forward features = torch.cat((u, v, torch.abs(u-v), u*v), 1) RuntimeError: The size of tensor a (64) must match the size of tensor b (33) at non-singleton dimension 0
The text was updated successfully, but these errors were encountered:
And i was confused with the parameters in the Nlinet: NLINet( (encoder): InferSent( (enc_lstm): LSTM(300, 2048, bidirectional=True) ) (classifier): Sequential( (0): Linear(in_features=16384, out_features=512, bias=True) (1): Linear(in_features=512, out_features=512, bias=True) (2): Linear(in_features=512, out_features=2, bias=True) ) )
why the classfier begin with a input feature of 16384?
@zhanqiuzhang ha, you are right bro. But the major issue in the title still not fixed. I just pack the tensor to sample shape with random float. It worked with deficiency in performance.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I use the infersent to train my corpus but got different shape while decode, I donnt know why.
VALIDATION : Epoch 1 Traceback (most recent call last): File "train_entail.py", line 319, in <module> eval_acc = evaluate(epoch, 'valid') File "train_entail.py", line 276, in evaluate output = nli_net((s1_batch, s1_len), (s2_batch, s2_len)) File "/data2/sda/jiaxin_hu/git_project/lib/python3.5/site-packages/torch/nn/modules/module.py", line 489, in __call__ result = self.forward(*input, **kwargs) File "/data2/sde/jiaxin_hu/git_project/InferSent/models.py", line 1036, in forward features = torch.cat((u, v, torch.abs(u-v), u*v), 1) RuntimeError: The size of tensor a (64) must match the size of tensor b (33) at non-singleton dimension 0
The text was updated successfully, but these errors were encountered: