Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'DecoderRNN' object has no attribute 'sample_beam' #49

Open
wjy3326 opened this issue Dec 31, 2020 · 0 comments
Open

'DecoderRNN' object has no attribute 'sample_beam' #49

wjy3326 opened this issue Dec 31, 2020 · 0 comments

Comments

@wjy3326
Copy link

wjy3326 commented Dec 31, 2020

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant