Shortcuts

Template Class TensorTransform

Inheritance Relationships

Base Type

  • public torch::data::transforms::Transform< Example< Tensor, Target >, Example< Tensor, Target > > (Template Class Transform)

Derived Types

Class Documentation

template<typename Target = Tensor>
class torch::data::transforms::TensorTransform : public torch::data::transforms::Transform<Example<Tensor, Target>, Example<Tensor, Target>>

A Transform that is specialized for the typical Example<Tensor, Tensor> combination.

It exposes a single operator() interface hook (for subclasses), and calls this function on input Example objects.

Subclassed by torch::data::transforms::Normalize< Target >, torch::data::transforms::TensorLambda< Target >

Public Types

using E = Example<Tensor, Target>

Public Functions

Tensor operator()(Tensor input) = 0

Transforms a single input tensor to an output tensor.

OutputType apply(InputType input) override

Implementation of Transform::apply that calls operator().

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