Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions
torch::data::transforms::Transform< Input, Output > Class Template Referenceabstract

A transformation of individual input examples to individual output examples. More...

#include <base.h>

Inheritance diagram for torch::data::transforms::Transform< Input, Output >:
torch::data::transforms::BatchTransform< std::vector< Input >, std::vector< Output > > torch::data::transforms::Lambda< Input, Output >

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.
 

Detailed Description

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

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.

Definition at line 32 of file base.h.


The documentation for this class was generated from the following file: