pytorch/examples

Query on loss calculation in word language model

開放

#1,082 建立於 2022年10月14日

 (0 則留言) (0 個反應) (0 位負責人)Python (9,429 個分叉)batch import
help wanted

倉庫指標

星標
 (21,634 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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?

貢獻者指南