Skip to content

You may meet "RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)" in beam_search.k_best_ouputs Function #3

@JerryZhouBUPT

Description

@JerryZhouBUPT

image
You can add outputs = outputs.to(device) at this place to fix this bug.

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