Struct burn::data::dataloader::DataLoaderBuilder
pub struct DataLoaderBuilder<I, O> { /* private fields */ }
Expand description
A builder for data loaders.
Implementations§
§impl<I, O> DataLoaderBuilder<I, O>
impl<I, O> DataLoaderBuilder<I, O>
pub fn new<B>(batcher: B) -> DataLoaderBuilder<I, O>where
B: DynBatcher<I, O> + 'static,
pub fn new<B>(batcher: B) -> DataLoaderBuilder<I, O>where
B: DynBatcher<I, O> + 'static,
pub fn batch_size(self, batch_size: usize) -> DataLoaderBuilder<I, O>
pub fn batch_size(self, batch_size: usize) -> DataLoaderBuilder<I, O>
Sets the batch size to a fix number.The fix batch strategy will be used.
§Arguments
batch_size
- The batch size.
§Returns
The data loader builder.
pub fn shuffle(self, seed: u64) -> DataLoaderBuilder<I, O>
pub fn shuffle(self, seed: u64) -> DataLoaderBuilder<I, O>
pub fn num_workers(self, num_workers: usize) -> DataLoaderBuilder<I, O>
pub fn num_workers(self, num_workers: usize) -> DataLoaderBuilder<I, O>
Auto Trait Implementations§
impl<I, O> Freeze for DataLoaderBuilder<I, O>
impl<I, O> !RefUnwindSafe for DataLoaderBuilder<I, O>
impl<I, O> Send for DataLoaderBuilder<I, O>
impl<I, O> !Sync for DataLoaderBuilder<I, O>
impl<I, O> Unpin for DataLoaderBuilder<I, O>
impl<I, O> !UnwindSafe for DataLoaderBuilder<I, O>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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