Class HWC2CHW

Inheritance Relationships

Base Type

Class Documentation

class HWC2CHW : public mindspore::dataset::TensorTransform

Transpose the input image; shape (H, W, C) to shape (C, H, W).

Public Functions

HWC2CHW()

Constructor.

Example
/* dataset is an instance of Dataset object */
dataset = dataset->Map({std::make_shared<vision::Decode>(),
                        std::make_shared<vision::HWC2CHW>()}, // operations
                       {"image"});                            // input columns

~HWC2CHW() = default

Destructor.