pytorch/examples

Query on loss calculation in word language model

Offen

#1.082 geöffnet am 14.10.2022

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (9.429 Forks)batch import
help wanted

Repository-Metriken

Stars
 (21.634 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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 https://github.com/pytorch/examples/blob/ca1bd9167f7216e087532160fc5b98643d53f87e/word_language_model/main.py#L163

However in the train function, total_loss is not getting multiplied by length of data https://github.com/pytorch/examples/blob/ca1bd9167f7216e087532160fc5b98643d53f87e/word_language_model/main.py#L194

Is this proper?

Contributor Guide