Skip to content

Transformer tutorial error #682

Closed
Closed
@dhpollack

Description

@dhpollack

https://github.com/pytorch/tutorials/blob/master/beginner_source/transformer_tutorial.py#L89

Since you are using the CrossEntropyLoss, you shouldn't do the log_softmax in the above line. You can either switch to the NLLLoss or remove the log_softmax to fix this.

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