A transformation of individual input examples to individual output examples. More...
#include <base.h>
Public Types | |
using | InputType = Input |
using | OutputType = Output |
Public Types inherited from torch::data::transforms::BatchTransform< std::vector< Input >, std::vector< Output > > | |
using | InputBatchType = std::vector< Input > |
using | OutputBatchType = std::vector< Output > |
Public Member Functions | |
virtual OutputType | apply (InputType input)=0 |
Applies the transformation to the given input . | |
std::vector< Output > | apply_batch (std::vector< Input > input_batch) override |
Applies the transformation over the entire input_batch . | |
A transformation of individual input examples to individual output examples.
Just like a Dataset
is a BatchDataset
, a Transform
is a BatchTransform
that can operate on the level of individual examples rather than entire batches. The batch-level transform is implemented (by default) in terms of the example-level transform, though this can be customized.