Skip to content

AttributeError: 'list' object has no attribute 'long' when forward with argument prev_output_tokens #1

@dinochen1020

Description

@dinochen1020

When running the pretrain script, in wav2seq/models/wav2vec2_asr_v2.py, Line 794
Screen Shot 2022-11-01 at 9 25 06 PM
The docs in forward function mentioned that the prev_output_tokens is LongTensor with shape (batch, tgt_len), while we get with list of tensors with different tgt_len for each tensor.
Screen Shot 2022-11-01 at 9 26 41 PM

Do anyone know how to solve it? I'm not sure whether setting the batch size to 1 and take the first element inside the list would work or not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions