pub struct DataLoaderConfig {
pub batch_size: usize,
pub shuffle: bool,
pub drop_last: bool,
}Expand description
DataLoader の構成(PyTorch DataLoader(batch_size=, shuffle=, drop_last=) 相当のサブセット)。
Fields§
§batch_size: usize§shuffle: bool§drop_last: boolImplementations§
Source§impl DataLoaderConfig
impl DataLoaderConfig
Sourcepub fn new(batch_size: usize) -> DataLoaderConfig
pub fn new(batch_size: usize) -> DataLoaderConfig
shuffle=false・drop_last=false の既定構成。
Sourcepub fn shuffle(self, on: bool) -> DataLoaderConfig
pub fn shuffle(self, on: bool) -> DataLoaderConfig
builder: shuffle を設定する。
Sourcepub fn drop_last(self, on: bool) -> DataLoaderConfig
pub fn drop_last(self, on: bool) -> DataLoaderConfig
builder: drop_last を設定する。
Trait Implementations§
Source§impl Clone for DataLoaderConfig
impl Clone for DataLoaderConfig
Source§fn clone(&self) -> DataLoaderConfig
fn clone(&self) -> DataLoaderConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DataLoaderConfig
Source§impl Debug for DataLoaderConfig
impl Debug for DataLoaderConfig
impl Eq for DataLoaderConfig
Source§impl PartialEq for DataLoaderConfig
impl PartialEq for DataLoaderConfig
impl StructuralPartialEq for DataLoaderConfig
Auto Trait Implementations§
impl Freeze for DataLoaderConfig
impl RefUnwindSafe for DataLoaderConfig
impl Send for DataLoaderConfig
impl Sync for DataLoaderConfig
impl Unpin for DataLoaderConfig
impl UnsafeUnpin for DataLoaderConfig
impl UnwindSafe for DataLoaderConfig
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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