pub struct DataLoader<D, B>{ /* private fields */ }Implementations§
Source§impl<D, B> DataLoader<D, B>
impl<D, B> DataLoader<D, B>
pub fn new(dataset: D, batcher: B, batch_size: usize, shuffle: bool) -> Self
pub fn dataset_len(&self) -> usize
pub fn batch_count(&self) -> usize
pub fn batch_size(&self) -> usize
pub fn iter<'a>(&'a self) -> DataLoaderIter<'a, D, B> ⓘ
Trait Implementations§
Source§impl<D, B> IntoIterator for DataLoader<D, B>
impl<D, B> IntoIterator for DataLoader<D, B>
Auto Trait Implementations§
impl<D, B> Freeze for DataLoader<D, B>
impl<D, B> RefUnwindSafe for DataLoader<D, B>where
D: RefUnwindSafe,
B: RefUnwindSafe,
impl<D, B> Send for DataLoader<D, B>
impl<D, B> Sync for DataLoader<D, B>
impl<D, B> Unpin for DataLoader<D, B>
impl<D, B> UnsafeUnpin for DataLoader<D, B>where
D: UnsafeUnpin,
B: UnsafeUnpin,
impl<D, B> UnwindSafe for DataLoader<D, B>where
D: UnwindSafe,
B: 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more