Skip to content

Query on loss calculation in word language model #1082

Open
@AvisP

Description

@AvisP

In the main.py of word language model, I find that in the evaluate function the total_loss is getting multiplied by length of data

total_loss += len(data) * criterion(output, targets).item()

However in the train function, total_loss is not getting multiplied by length of data

total_loss += loss.item()

Is this proper?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions