Shortcuts

Template Class TensorLambda

Inheritance Relationships

Base Type

Class Documentation

template<typename Target = Tensor>
class TensorLambda : public torch::data::transforms::TensorTransform<Tensor>

A Lambda specialized for the typical Example<Tensor, Tensor> input type.

Public Types

using FunctionType = std::function<Tensor(Tensor)>

Public Functions

inline explicit TensorLambda(FunctionType function)

Creates a TensorLambda from the given function.

inline virtual Tensor operator()(Tensor input) override

Applies the user-provided functor to the input tensor.

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