mindspore.dataset.transforms.py_transforms

This module py_transforms is implemented basing on python. It provides commonoperations including OneHotOp.

  • class mindspore.dataset.transforms.pytransforms.OneHotOp(_num_classes, smoothing_rate=0.0)[source]
  • Apply one hot encoding transformation to the input label, make label be more smoothing and continuous.

    • Parameters
      • num_classes (int) – Num class of object in dataset, type is int and value over 0.

      • smoothing_rate (float) – The adjustable Hyper parameter decides the label smoothing level , 0.0 means not do it.