pub struct ReplaySafeTensorDataset { /* private fields */ }Expand description
Tensor dataset with private backing storage and independently owned rows.
Trait Implementations§
Source§impl Dataset for ReplaySafeTensorDataset
impl Dataset for ReplaySafeTensorDataset
Source§type Error = RustTorchError
type Error = RustTorchError
An error returned while loading a sample.
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
Source§impl DatasetCheckpoint for ReplaySafeTensorDataset
impl DatasetCheckpoint for ReplaySafeTensorDataset
Source§fn snapshot_dataset(&self) -> Self::State
fn snapshot_dataset(&self) -> Self::State
Captures dataset state at the visible boundary.
Source§fn validate_dataset_state(&self, _state: &Self::State) -> Result<()>
fn validate_dataset_state(&self, _state: &Self::State) -> Result<()>
Checks state compatibility without mutation.
Source§fn restore_dataset_validated(&mut self, _state: &Self::State)
fn restore_dataset_validated(&mut self, _state: &Self::State)
Restores state accepted by
Self::validate_dataset_state.impl ReplaySafeDataset for ReplaySafeTensorDataset
Auto Trait Implementations§
impl !Sync for ReplaySafeTensorDataset
impl Forget for ReplaySafeTensorDataset
impl Freeze for ReplaySafeTensorDataset
impl RefUnwindSafe for ReplaySafeTensorDataset
impl Send for ReplaySafeTensorDataset
impl Unpin for ReplaySafeTensorDataset
impl UnsafeUnpin for ReplaySafeTensorDataset
impl UnwindSafe for ReplaySafeTensorDataset
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