Trait multi_skill::data_processing::Dataset [−][src]
Generic Dataset trait, modeled after PyTorch's utils.data.Dataset.
It represents a collection of objects indexed by integers from 0 to len().
Associated Types
Loading content...Required methods
fn len(&self) -> usize[src]
The number of objects in the Dataset.
fn get(&self, index: usize) -> Self::Item[src]
Get the index'th element, where 0 <= index < len()
Provided methods
fn cached(self, cache_dir: impl Into<PathBuf>) -> CachedDataset<Self> where
Self: Sized, [src]
Self: Sized,
Modifies the dataset to check a cache directory before reading.
If the cache entry is present, it's used instead of the underlying get().
If the cache entry is absent, it will be created after calling get().
fn iter(&self) -> Box<dyn Iterator<Item = Self::Item>>[src]
Produces an Iterator that produces the entire Dataset in indexed order.
Implementations on Foreign Types
impl<T: Clone> Dataset for [T][src]
A slice can act as an in-memory Dataset.
impl<D: Dataset + ?Sized> Dataset for &D[src]
References to Datasets are also Datasets.
impl<D: Dataset + ?Sized> Dataset for Box<D>[src]
Loading content...Implementors
impl<D: Dataset> Dataset for CachedDataset<D> where
D::Item: Serialize + DeserializeOwned, [src]
D::Item: Serialize + DeserializeOwned,