code: def test_mixup_cutmix_transform_single_label_image_batch_label_smooth(
      self,
  ):
      mixup_alpha = 0.3
      cutmix_alpha = 0.2
      num_classes = 3
  
      for mode in ["batch", "pair", "elem"]:
          cutmix_transform = MixupTransform(
              mixup_alpha,
              num_classes,
              cutmix_alpha=cutmix_alpha,
              switch_prob=0.5,
              mode=mode,
              label_smoothing=0.1,
          )
  
          for _i in range(4):
              sample = {
                  "input": torch.rand(
                      4, 3, 224, 224, dtype=torch.float32
                  ),
                  "target": torch.as_tensor(
                      [0, 1, 2, 2], dtype=torch.int32
                  ),
              }
              sample_cutmix = cutmix_transform(sample)
              self.assertTrue(
                  sample["input"].shape == sample_cutmix["input"].shape
              )
              self.assertTrue(sample_cutmix["target"].shape[0] == 4)
              self.assertTrue(sample_cutmix["target"].shape[1] == 3)
  
file_path: ClassyVision/test/dataset_transforms_mixup_test.py
imports: import unittest
  import torch
  from classy_vision.dataset.transforms.mixup import MixupTransform
label_desc: Use image node_id 4 for calling the DatasetTransformsMixupTest obj's underlying member method code with example usage: obj.test_mixup_cutmix_transform_single_label_image_batch_label_smooth() without return types