Closed Hassaan-Elahi closed 6 years ago
Change the parameter 'dim_vid' to 2048.
@zhjohnchan I got ValueError: not enough values to unpack (expected 3, got 2) while running train.py
Details are:
Traceback (most recent call last):
File "train.py", line 133, in
I did all the prerequisites i.e download the dataset , extract features and build vocab before start training. When I started training a run time error occurred.
File "drive/DeepLearning/PytorchModel/Pytorch/train.py", line 138, in
main(opt)
File "drive/DeepLearning/PytorchModel/Pytorch/train.py", line 121, in main
train(dataloader, model, crit, optimizer, exp_lr_scheduler, opt, rl_crit)
File "drive/DeepLearning/PytorchModel/Pytorch/train.py", line 40, in train
seqprobs, = model(fc_feats, labels, 'train')
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, kwargs)
File "/content/drive/DeepLearning/PytorchModel/Pytorch/models/S2VTAttModel.py", line 28, in forward
encoder_outputs, encoder_hidden = self.encoder(vid_feats)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, *kwargs)
File "/content/drive/DeepLearning/PytorchModel/Pytorch/models/EncoderRNN.py", line 53, in forward
vid_feats = self.vid2hid(vid_feats.view(-1, dim_vid))
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(input, kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/linear.py", line 55, in forward
return F.linear(input, self.weight, self.bias)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 992, in linear
return torch.addmm(bias, input, weight.t())
RuntimeError: size mismatch, m1: [4000 x 2048], m2: [4096 x 512] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:249