3 #include <torch/data/datasets/base.h> 4 #include <torch/data/example.h> 5 #include <torch/types.h> 30 return tensor.size(0);
optional< size_t > size() const override
Returns the number of tensors in the dataset.
An Example from a dataset.
A dataset that can yield data in batches, or as individual examples.
TensorDataset(const std::vector< Tensor > &tensors)
Creates a TensorDataset from a vector of tensors.