3 #include <torch/data/datasets/base.h> 4 #include <torch/data/example.h> 5 #include <torch/types.h> 7 #include <torch/csrc/WindowsTorchApiMacro.h> 19 enum class Mode { kTrain, kTest };
25 explicit MNIST(
const std::string& root,
Mode mode = Mode::kTrain);
34 bool is_train()
const noexcept;
37 const Tensor& images()
const;
40 const Tensor& targets()
const;
An Example from a dataset.
A dataset that can yield data in batches, or as individual examples.
Mode
The mode in which the dataset is loaded.