meijieru / crnn.pytorch

Convolutional recurrent network in pytorch
MIT License
2.4k stars 657 forks source link

About loss #232

Open vincezengqiang opened 4 years ago

vincezengqiang commented 4 years ago

in the train.py, we calculate loss by: cost = criterion(preds, text, preds_size, length) / batch_size but the sample provided by pytorch does not divide batch_size, so should we divide batch_Size?

vincezengqiang commented 4 years ago

the default param :reduction of ctc loss is 'mean', so why still divide batchsize?