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

IndexError: #15

Open
feixiangqiqi opened this issue Sep 22, 2022 · 0 comments
Open

IndexError: #15

feixiangqiqi opened this issue Sep 22, 2022 · 0 comments

Comments

@feixiangqiqi
Copy link

Traceback (most recent call last):
File "scripts/sample_speaker.py", line 88, in
captions_predicted, attn_weights = versatile_caption_sampler(speaker, annotate_loader, device, **config)
File "../artemis/captioning/sample_captions.py", line 35, in versatile_caption_sampler
drop_bigrams=drop_bigrams)
File "/usr/local/lib/python3.6/dist-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "../artemis/neural_models/attentive_decoder.py", line 586, in sample_captions_beam_search
seqs = torch.cat([seqs[prev_word_inds], next_word_inds.unsqueeze(1)], dim=1) # (s, step+1)
IndexError: tensors used as indices must be long, byte or bool tensors

When run sample_speaker.py, there is a mistake. Can you advise what I'm doing wrong here? Thanks!

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