Thanks @tom for replying! So do you mean to look if sum(loss1) == loss2 when loss1 = nn.CTCLoss(reduction='none') and loss2 = nn.CTCLoss(reduction='sum')? I did use reduction='elementwise_mean', but will try and let you know.