Rate this Page

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.