meijieru / crnn.pytorch

Convolutional recurrent network in pytorch
MIT License
2.38k stars 658 forks source link

About loss #232

Open vincezengqiang opened 3 years ago

vincezengqiang commented 3 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 3 years ago

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