31 [[nodiscard]] int64_t
size()
const override;
38 [[nodiscard]]
Sample get(int64_t index)
const override;
41 [[nodiscard]]
const std::vector<std::string>&
classes()
const {
return classes_; }
49 std::vector<Entry> entries_;
50 std::vector<std::string> classes_;
51 DeviceBackend* backend_;
Random-access dataset abstraction – pulsatrix's analogue of PyTorch's torch.utils....
Definition dataset.hpp:33
Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:219
Dataset over a directory tree of the form root_dir/<class_name>/<image_file>, mirroring torchvision's...
Definition image_folder_dataset.hpp:21
Sample get(int64_t index) const override
int64_t size() const override
Number of samples in this dataset.
const std::vector< std::string > & classes() const
Sorted class names; classes()[i] is the human-readable name for label i.
Definition image_folder_dataset.hpp:41
ImageFolderDataset(const std::string &root_dir, DeviceBackend *backend)
Random-access dataset abstraction – Sample, Dataset (size()/get()).
Abstract interface isolating vendor-specific memory/compute operations from Tensor/ComputationGraph.
Definition acquisition_functions.hpp:16
One dataset sample: an ordered list of Tensor fields (e.g. {features, label} or {image,...
Definition dataset.hpp:19