pub struct ComposedDataset<D> { /* private fields */ }Expand description
Compose multiple datasets together to create a bigger one.
Implementations§
Trait Implementations§
Source§impl<D, I> Dataset<I> for ComposedDataset<D>
impl<D, I> Dataset<I> for ComposedDataset<D>
Auto Trait Implementations§
impl<D> Freeze for ComposedDataset<D>
impl<D> RefUnwindSafe for ComposedDataset<D>where
D: RefUnwindSafe,
impl<D> Send for ComposedDataset<D>where
D: Send,
impl<D> Sync for ComposedDataset<D>where
D: Sync,
impl<D> Unpin for ComposedDataset<D>where
D: Unpin,
impl<D> UnwindSafe for ComposedDataset<D>where
D: 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<I, T> Windows<I> for Twhere
T: Dataset<I>,
impl<I, T> Windows<I> for Twhere
T: Dataset<I>,
Source§fn windows(&self, size: usize) -> WindowsIterator<'_, I> ⓘ
fn windows(&self, size: usize) -> WindowsIterator<'_, I> ⓘ
Is empty if the Dataset is shorter than size.
§Panics
Panics if size is 0.
§Examples
use crate::burn_dataset::{
transform::{Windows, WindowsDataset},
Dataset, InMemDataset,
};
let items = [1, 2, 3, 4].to_vec();
let dataset = InMemDataset::new(items.clone());
for window in dataset.windows(2) {
// do sth with window
}