Shortcuts

Template Class Lambda

Inheritance Relationships

Base Type

Class Documentation

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

Public Types

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

Public Functions

inline explicit Lambda(FunctionType function)

Constructs the Lambda from the given function object.

inline virtual OutputType apply(InputType input) override

Applies the user-provided function object to the input.

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