Mixup (Zhang et al., 2018) trains on convex combinations of pairs of examples and their labels. It is a simple augmentation that smooths the decision boundary between classes.
Implement mixup_inputs(x, perm, lam), which blends each example with the example at its permuted index using weight lam.
lam is in [0, 1].perm is a permutation of the batch indices.Index the batch with perm to get the partners, then take the weighted sum.
No results yet
Run your code to check it against the examples, or submit to run every test.