mindspore.dataset.vision.c_transforms.HWC2CHW
- class mindspore.dataset.vision.c_transforms.HWC2CHW[source]
Transpose the input image; shape (H, W, C) to shape (C, H, W).
Examples
>>> import mindspore.dataset.vision.c_transforms as c_vision >>> >>> transforms_list = [c_vision.Decode(), c_vision.RandomHorizontalFlip(0.75), c_vision.RandomCrop(512), >>> c_vision.HWC2CHW()] >>> data1 = data1.map(operations=transforms_list, input_columns=["image"])