Closed caryleo closed 4 years ago
Don't worry about the warning.
The error is caused by weight = next(self.parameters()). For some reason self.parameters() gives you an empty iterator. Not sure why. For now, you may replace init_hidden with.
return (torch.zeros(self.num_layers, bsz, self.rnn_size).cuda(),
torch.zeros(self.num_layers, bsz, self.rnn_size).cuda())
Not 100% sure if it would work or not.
Thank you for your help! After the modification the code can run stably. After that I recreate a new conda environment with pytorch=1.3.0
(I used pytorch=1.5.0
), the code can also run stably without the modification. So I think it's the matter of the new version.
Hi! Thank you for your amazing code base. I'm reading and trying to retrain the model, especially in multi GPU way. Since I can't find manual about multi GPU setting, I use the traditional way to set the system environment variable
CUDA_VISIBLE_DEVICES
, like: $ CUDA_VISIBLE_DEVICES="6,7" python train.py --cfg configs/updown.yml --id test_updown` I have alreay executed the preprocessing scripts and downloaded the updown features. But here raised an Error (reproducible):This error is only raised when I use the
CUDA_VISIBLE_DEVICES
to multi GPU, while a single GPU setting (CUDA_VISIBLE_DEVICES=6
) can run stably. I notice two warnings at the top of the output, I wonder if these missing module cause the problem.Thank you very much!