mindspore.dataset.transforms
This module is to support common augmentations. C_transforms is a high performance augmentation module which is developed by C++. Py_transforms provides an optional implementation which is developed by Python & NumPy.
Common imported modules in corresponding API examples are as follows:
import mindspore.dataset as ds
import mindspore.dataset.vision.c_transforms as c_vision
import mindspore.dataset.vision.py_transforms as py_vision
from mindspore.dataset.transforms import c_transforms
from mindspore.dataset.transforms import py_transforms
Descriptions of common data processing terms are as follows:
TensorOperation, the base class of all data processing operations implemented in C++.
PyTensorOperation, the base class of all data processing operations implemented in Python.
mindspore.dataset.transforms.c_transforms
Compose a list of transforms into a single transform. |
|
Tensor operation that concatenates all columns into a single tensor. |
|
Duplicate the input tensor to output, only support transform one column each time. |
|
Tensor operation to fill all elements in the tensor with the specified value. |
|
Mask content of the input tensor with the given predicate. |
|
Tensor operation to apply one hot encoding. |
|
Pad input tensor according to pad_shape, input tensor needs to have same rank. |
|
Randomly perform a series of transforms with a given probability. |
|
Randomly select one transform from a list of transforms to perform operation. |
|
Relationship operator. |
|
Slice operation to extract a tensor out using the given n slices. |
|
Tensor operation to cast to a given MindSpore data type. |
|
Perform the unique operation on the input tensor, only support transform one column each time. |
mindspore.dataset.transforms.py_transforms
Compose a list of transforms. |
|
Apply one hot encoding transformation to the input label, make label be more smoothing and continuous. |
|
Randomly perform a series of transforms with a given probability. |
|
Randomly select one transform from a series of transforms and applies that on the image. |
|
Perform a series of transforms to the input PIL image in a random order. |