Caffe2 - C++ API
A deep learning, cross platform ML framework
stateful.h
1 #pragma once
2 
3 #include <torch/data/datasets/base.h>
4 #include <torch/data/example.h>
5 
6 #include <cstddef>
7 #include <vector>
8 
9 namespace torch {
10 namespace data {
11 namespace datasets {
12 
24 template <
25  typename Self,
26  typename Batch = std::vector<Example<>>,
27  typename BatchRequest = size_t>
29  : public BatchDataset<Self, optional<Batch>, BatchRequest> {
30  public:
32  virtual void reset() = 0;
33 };
34 } // namespace datasets
35 } // namespace data
36 } // namespace torch
A dataset that can yield data only in batches.
Definition: base.h:40
A stateful dataset is a dataset that maintains some internal state, which will be reset() at the begi...
Definition: stateful.h:28
Definition: jit_type.h:17
virtual void reset()=0
Resets internal state of the dataset.