warp-ctc icon indicating copy to clipboard operation
warp-ctc copied to clipboard

How to return the individual loss of each sequence?

Open weedwind opened this issue 6 years ago • 1 comments

Hi,

Right now the code returns the average or total loss for the entire batch, I am wondering how should I change the source code to return loss for each individual sequence in a batch?

Thank you so much.

weedwind avatar Jul 11 '18 02:07 weedwind

Hi,

You have to modify the init.py file in : warp-ctc/pytorch_binding/warpctc_pytorch. You can have a look to the _CTC function, this is where averaging is done. You might modify line 33 to 45, and process the variable "costs" differently.

ftorregrossa avatar Jul 20 '18 09:07 ftorregrossa