Skip to content

IndexError: #15

@feixiangqiqi

Description

@feixiangqiqi

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions