Template Class BatchLambda¶
Defined in File lambda.h
Page Contents
Inheritance Relationships¶
Base Type¶
public torch::data::transforms::BatchTransform< Input, Input >
(Template Class BatchTransform)
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 givenfunction
object.
-
inline virtual OutputBatchType apply_batch(InputBatchType input_batch) override¶
Applies the user-provided function object to the
input_batch
.
-
using FunctionType = std::function<OutputBatchType(InputBatchType)>¶