Template Class BatchDataset¶
Defined in File base.h
Page Contents
Class Documentation¶
-
template<typename
Self
, typenameBatch
= std::vector<Example<>>, typenameBatchRequest
= ArrayRef<size_t>>
classtorch::data::datasets
::
BatchDataset
¶ A dataset that can yield data only in batches.
Public Functions
-
~BatchDataset
() = default¶
-
Batch
get_batch
(BatchRequest request) = 0¶ Returns a batch of data given an index.
-
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 giventransform
to this dataset.
-
template<typename
TransformType
>
MapDataset<Self, TransformType>map
(TransformType transform) &&¶ Creates a
MapDataset
that applies the giventransform
to this dataset.
Public Static Attributes
-
static constexpr bool
is_stateful
= detail::is_optional<BatchType>::value¶
-