Because the target is a mix of two labels, the loss is also a mix. The paper's key observation is that the mixed loss equals the loss against the mixed target for cross-entropy, so the two views agree.
Implement mixup_loss(loss_a, loss_b, lam), returning lam * loss_a + (1 - lam) * loss_b.
It is a single weighted sum of the two loss values.
No results yet
Run your code to check it against the examples, or submit to run every test.