0
0
Computer Visionml~10 mins

MixUp strategy in Computer Vision - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create mixed inputs using MixUp.

Computer Vision
mixed_x = lambda x1, x2, lam: lam * x1 + [1] * x2
Drag options to blanks, or click blank then click option'
Alam + 1
Blam - 1
C1 - lam
Dlam
Attempts:
3 left
💡 Hint
Common Mistakes
Using lam instead of 1 - lam for the second input weight.
Adding lambda values instead of subtracting.
Using incorrect arithmetic operators.
2fill in blank
medium

Complete the code to mix labels in MixUp.

Computer Vision
mixed_y = lam * y1 + [1] * y2
Drag options to blanks, or click blank then click option'
A1 - lam
Blam + 1
Clam
Dlam * 2
Attempts:
3 left
💡 Hint
Common Mistakes
Using lam for both labels.
Multiplying lam by 2 incorrectly.
Adding lam and 1 instead of subtracting.
3fill in blank
hard

Fix the error in the MixUp lambda sampling code.

Computer Vision
lam = np.random.beta([1], [1])
Drag options to blanks, or click blank then click option'
A1.0
B0.5
C0
D2.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 1.0 which results in uniform distribution.
Using 0 which is invalid for Beta distribution.
Using 2.0 which biases mixing too much.
4fill in blank
hard

Fill both blanks to create a MixUp batch of inputs and labels.

Computer Vision
mixed_x = lam * x + [1] * x[[2]]
Drag options to blanks, or click blank then click option'
A1 - lam
Blam
Cperm
Dx
Attempts:
3 left
💡 Hint
Common Mistakes
Using lam instead of 1 - lam for the second weight.
Using x instead of permuted indices for the second input.
5fill in blank
hard

Fill all three blanks to complete the MixUp label mixing code.

Computer Vision
mixed_y = lam * y + [1] * y[[2]]  # y shape: [3]
Drag options to blanks, or click blank then click option'
A1 - lam
Bperm
C(batch_size, num_classes)
D(num_classes, batch_size)
Attempts:
3 left
💡 Hint
Common Mistakes
Using lam instead of 1 - lam.
Using wrong shape for labels.
Not using permuted indices for label mixing.