video-caption.pytorch icon indicating copy to clipboard operation
video-caption.pytorch copied to clipboard

'DecoderRNN' object has no attribute 'sample_beam'

Open wjy3326 opened this issue 3 years ago • 0 comments

when I run python eval.py with beam_size=2, occur the problem 'DecoderRNN' object has no attribute 'sample_beam'

init COCO-EVAL scorer Traceback (most recent call last): File "eval.py", line 122, in main(opt) File "eval.py", line 91, in main test(model, crit, dataset, dataset.get_vocab(), opt) File "eval.py", line 48, in test fc_feats, mode='inference', opt=opt) File "/u01/isi/maxq/envs/scan_envs/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, **kwargs) File "/u01/isi/wangjunyan/video_captioning/video-caption.pytorch/models/S2VTAttModel.py", line 29, in forward seq_prob, seq_preds = self.decoder(encoder_outputs, encoder_hidden, target_variable, mode, opt) File "/u01/isi/maxq/envs/scan_envs/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, **kwargs) File "/u01/isi/wangjunyan/video_captioning/video-caption.pytorch/models/DecoderRNN.py", line 109, in forward return self.sample_beam(encoder_outputs, decoder_hidden, opt) File "/u01/isi/maxq/envs/scan_envs/lib/python2.7/site-packages/torch/nn/modules/module.py", line 532, in getattr type(self).name, name)) AttributeError: 'DecoderRNN' object has no attribute 'sample_beam'

wjy3326 avatar Dec 31 '20 06:12 wjy3326