Class RandomChoice

Inheritance Relationships

Base Type

Class Documentation

class RandomChoice : public mindspore::dataset::TensorTransform

Randomly select one transform from a list of transforms to perform on the input tensor.

Public Functions

explicit RandomChoice(const std::vector<TensorTransform*> &transforms)

Constructor.

Parameters

transforms[in] A vector of raw pointers to TensorTransform objects to be applied.

explicit RandomChoice(const std::vector<std::shared_ptr<TensorTransform>> &transforms)

Constructor.

Parameters

transforms[in] A vector of shared pointers to TensorTransform objects to be applied.

explicit RandomChoice(const std::vector<std::reference_wrapper<TensorTransform>> &transforms)

Constructor.

Parameters

transforms[in] A vector of TensorTransform objects to be applied.

~RandomChoice() = default

Destructor.