Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions | Static Public Attributes
torch::data::datasets::BatchDataset< Self, Batch, BatchRequest > Class Template Referenceabstract

A dataset that can yield data only in batches. More...

#include <base.h>

Inheritance diagram for torch::data::datasets::BatchDataset< Self, Batch, BatchRequest >:
InfiniteStreamDataset

Public Types

using SelfType = Self
 
using BatchType = Batch
 
using BatchRequestType = BatchRequest
 

Public Member Functions

virtual Batch get_batch (BatchRequest request)=0
 Returns a batch of data given an index.
 
virtual optional< size_t > size () const =0
 Returns the size of the dataset, or an empty optional if it is unsized.
 
template<typename TransformType >
MapDataset< Self, TransformType > map (TransformType transform)&
 Creates a MapDataset that applies the given transform to this dataset.
 
template<typename TransformType >
MapDataset< Self, TransformType > map (TransformType transform)&&
 Creates a MapDataset that applies the given transform to this dataset.
 

Static Public Attributes

static constexpr bool is_stateful = detail::is_optional<BatchType>::value
 

Detailed Description

template<typename Self, typename Batch = std::vector<Example<>>, typename BatchRequest = ArrayRef<size_t>>
class torch::data::datasets::BatchDataset< Self, Batch, BatchRequest >

A dataset that can yield data only in batches.

Definition at line 40 of file base.h.


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