Skip to content

error when computing the loss function #5

@abracadabrac

Description

@abracadabrac

Your network computes a probability distribution over the target language vocabulary. Then the whole vector must be used to compute the loss, not only the first element. It makes no sens and does not even compile. How cold you train your model with this criterion ?

loss += criterion(decoder_output[0], target_var[di])

It should be

loss += criterion(decoder_output, target_var[di])

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