pub struct Subset<D> { /* private fields */ }Expand description
A dataset containing selected indices from another dataset.
Implementations§
Trait Implementations§
Source§impl<D> Dataset for Subset<D>where
D: Dataset,
impl<D> Dataset for Subset<D>where
D: Dataset,
Source§fn get_batch(&self, indices: &[usize]) -> Result<Vec<Self::Sample>, Self::Error>
fn get_batch(&self, indices: &[usize]) -> Result<Vec<Self::Sample>, Self::Error>
Loads samples for one index batch. Read more
Source§fn get_batch_with_context(
&self,
indices: &[usize],
context: &WorkerContext,
) -> Result<Vec<Self::Sample>, Self::Error>
fn get_batch_with_context( &self, indices: &[usize], context: &WorkerContext, ) -> Result<Vec<Self::Sample>, Self::Error>
Loads one index batch with cooperative worker lifecycle context. Read more
impl<D> ReplaySafeDataset for Subset<D>where
D: ReplaySafeDataset,
Auto Trait Implementations§
impl<D> Freeze for Subset<D>where
D: Freeze,
impl<D> RefUnwindSafe for Subset<D>where
D: RefUnwindSafe,
impl<D> Send for Subset<D>where
D: Send,
impl<D> Sync for Subset<D>where
D: Sync,
impl<D> Unpin for Subset<D>where
D: Unpin,
impl<D> UnsafeUnpin for Subset<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for Subset<D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more