burn_core::data::dataloader

Trait DynDataLoader

Source
pub trait DynDataLoader<O>: DataLoader<O> {
    // Required method
    fn clone_dyn(&self) -> Box<dyn DynDataLoader<O>>;
}
Available on crate features std and dataset only.
Expand description

A super trait for dataloader that allows it to be cloned dynamically.

Any dataloader that implements Clone should also implement this automatically.

Required Methods§

Source

fn clone_dyn(&self) -> Box<dyn DynDataLoader<O>>

Clone the dataloader and returns a new one.

Implementors§

Source§

impl<D, O> DynDataLoader<O> for D
where D: DataLoader<O> + Clone + 'static,