code: def test_smoothing_all_ones_one_hot_targets(self):
      config = {
          "name": "label_smoothing_cross_entropy",
          "ignore_index": -1,
          "smoothing_param": 0.1,
      }
      crit = build_loss(config)
      targets = torch.tensor([[1, 1, 1, 1]])
      self.assertTrue(isinstance(crit, LabelSmoothingCrossEntropyLoss))
      valid_targets = crit.compute_valid_targets(targets, 4)
      self.assertTrue(
          torch.allclose(
              valid_targets, torch.tensor([[1.0, 1.0, 1.0, 1.0]])
          )
      )
  
      smoothed_targets = crit.smooth_targets(valid_targets, 4)
      self.assertTrue(
          torch.allclose(
              smoothed_targets, torch.tensor([[0.25, 0.25, 0.25, 0.25]])
          )
      )
  
file_path: ClassyVision/test/losses_label_smoothing_cross_entropy_loss_test.py
imports: import copy
  import unittest
  import torch
  from classy_vision.losses import build_loss, LabelSmoothingCrossEntropyLoss
label_desc: Use image node_id 5 for calling the TestLabelSmoothingCrossEntropyLoss obj's underlying member method code with example usage: obj.test_smoothing_all_ones_one_hot_targets() without return types