Rate this Page

Template Struct Normalize#

Inheritance Relationships#

Base Type#

Struct Documentation#

template<typename Target = Tensor>
struct Normalize : public torch::data::transforms::TensorTransform<Tensor>#

Normalizes input tensors by subtracting the supplied mean and dividing by the given standard deviation.

Public Functions

inline Normalize(ArrayRef<double> mean, ArrayRef<double> stddev)#

Constructs a Normalize transform.

The mean and standard deviation can be anything that is broadcastable over the input tensors (like single scalars).

inline virtual torch::Tensor operator()(Tensor input) override#

Transforms a single input tensor to an output tensor.

Public Members

torch::Tensor mean#
torch::Tensor stddev#