mindspore.dataset.transforms.c_transforms
This module c_transforms provides common operations, including OneHotOp and TypeCast.
- class
mindspore.dataset.transforms.ctransforms.
OneHot
(_num_classes)[source] Tensor operation to apply one hot encoding.
- Parameters
- num_classes (int) – Number of classes of the label.
- class
mindspore.dataset.transforms.ctransforms.
TypeCast
(_data_type)[source] Tensor operation to cast to a given MindSpore data type.
- Parameters
- data_type (mindspore.dtype) – mindspore.dtype to be casted to.