Performance, Pytorch, Deep Learning, Artificial Intelligence, Tensorboard.
self.cross_entropy(pred, target) # zero the loss in the case that the number of unique elements # is below the threshold if ignore_loss: loss = 0. * loss return loss Our loss function seems innocent enough, right? Wrong! As we will see below, the loss function includes a number of operations that