Complete the code to create mixed inputs using MixUp.
mixed_x = lambda x1, x2, lam: lam * x1 + [1] * x2MixUp combines two inputs weighted by lambda and (1 - lambda).
Complete the code to mix labels in MixUp.
mixed_y = lam * y1 + [1] * y2Labels are mixed with the same weights as inputs: lam and 1 - lam.
Fix the error in the MixUp lambda sampling code.
lam = np.random.beta([1], [1])
The MixUp lambda is sampled from a Beta distribution with alpha=beta=0.5 for stronger mixing.
Fill both blanks to create a MixUp batch of inputs and labels.
mixed_x = lam * x + [1] * x[[2]]
MixUp uses (1 - lam) for the second input weight and permuted indices to shuffle the batch.
Fill all three blanks to complete the MixUp label mixing code.
mixed_y = lam * y + [1] * y[[2]] # y shape: [3]
Labels are mixed with 1 - lam and permuted indices; labels usually have shape (batch_size, num_classes).
