We implement CutMix [1]} as follows: Let \(\mathcal {D} = \lbrace (x_i, y_i)\rbrace _{i=1}^n\)  be the training dataset with \(x_i \in \mathbb {R}^{w \times h \times c}\) . Let \((x_i,y_i)\)  and \((x_j, y_j)\)  be two randomly sampled feature-target pairs. We randomly generate a box \(M \in \lbrace 0,1\rbrace ^{w \times h}\)  that indicates the pixels to be cut/pasted. All values of \(M\)  are defined to be one except in a box centered at \((r_x,r_y)\)  where they are zero. To obtain the box location, we randomly sample the center \(r_x \sim \text{Unif}(0,w)\)  and \(r_y \sim \text{Unif}(0,h)\)  for the first and second axes respectively. As in mixup, we use a coefficient \(\lambda \sim \text{Dir}[1,1]\)  to determine the relative contribution from each of the two randomly sampled data points. i.e. \(r_w = w \sqrt{1-\lambda }\)  and \(r_h = h\sqrt{1-\lambda }\)  give the width and height for the patch of zeros in \(M\) . The augmented image for CutMix becomes \(\tilde{x} = M \bigodot x_i + (1-M) \bigodot x_j\)  with label \(\tilde{y} = \lambda y_i + (1-\lambda ) y_j\)  obtained by mixing initial labels proportionally to the size of \(M\) . The binary operation \(\bigodot \)  represents element-wise multiplication.
