I mean where you do loss = loss_criteria(output, target) you might want to try loss = loss_criteria(output[0], target) as the loss function likely doesn’t expect the first argument to be a tuple but rather just a single tensor for the predictions.