Open wangxinyu0922 opened 6 years ago
I have a similar bug reported in the validation phase. I was wondering I should replace fg_seq[i,j] by fg_seq[i,j].item() as well? Thanks for your help!
Exception NameError: "global name 'FileNotFoundError' is not defined" in <bound method _DataLoaderIter.del of <torch.utils.data.dataloader._DataLoaderIter object at 0x7f4039abbf50>> ignored
/DATA/Ke/Babytalk/NeuralBabyTalk/misc/model.py:306: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad():
instead.
conv_feats, fc_feats = self.cnn(Variable(img.data, volatile=True))
Traceback (most recent call last):
File "main.py", line 357, in
There are many part having the same problem, you can try it.
@Dvangelion, I meet the same problem, have you solved it ???
In my environment (pytorch 0.4.0), it will report error for line 78: word = itow[str(ix)] Because ix is a tensor, so it is better to use ix.item() to replace the ix, also for line 112, 128 and 154