Shortcuts

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

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources