code: def add_ops_for_categorical_label(self, net):
      if self.label.field_type().base != np.int64:
          int64_label = net.NextScopedBlob("int64_label")
          net.Cast(
              [self.label()], [int64_label], to=core.DataType.INT64
          )
      else:
          int64_label = self.label()
      one_hot_label = net.NextScopedBlob("one_hot_label")
      net.OneHot([int64_label, self.len], [one_hot_label])
      net.MatMul(
          [one_hot_label, self.smooth_matrix], self.output_schema()
      )
  
file_path: pytorch/caffe2/python/layers/label_smooth.py
imports: from caffe2.python import core, schema
  from caffe2.python.layers.layers import ModelLayer
  import numpy
label_desc: Use image node_id 5 for calling the LabelSmooth obj's underlying member method code with example usage: obj.add_ops_for_categorical_label(net) without return types