Shortcuts

Template Class BatchLambda

Inheritance Relationships

Base Type

Class Documentation

template<typename Input, typename Output = Input>
class BatchLambda : public torch::data::transforms::BatchTransform<Input, Input>

A BatchTransform that applies a user-provided functor to a batch.

Public Types

using FunctionType = std::function<OutputBatchType(InputBatchType)>

Public Functions

inline explicit BatchLambda(FunctionType function)

Constructs the BatchLambda from the given function object.

inline virtual OutputBatchType apply_batch(InputBatchType input_batch) override

Applies the user-provided function object to the input_batch.

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