Template Class Lambda

Inheritance Relationships

Base Type

Class Documentation

template<typename Input, typename Output = Input>
class torch::data::transforms::Lambda : public torch::data::transforms::Transform<Input, Output>

Public Types

using FunctionType = std::function<Output(Input)>

Public Functions

Lambda(FunctionType function)

Constructs the Lambda from the given function object.

OutputType apply(InputType input) override

Applies the user-provided function object to the input.


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources