I’m implementing the paper Learning from Between-class Examples for Deep Sound Recognition
(Chainer implementation: https://github.com/mil-tokyo/bc_learning_image 61)
The method used in the paper works by mixing two inputs and their respective targets. This requires the targets to be smooth (float/double).
However, PyTorch’s nll_loss (used by CrossEntropyLoss) requires that the target tensors will be in the Long format.
One idea is to do weighted sum of hard loss for each non zero label. This seems reasonable to me, since there are two such labels in this case (because you mix two samples).
Whats the recommended way to go about this?