pub trait DataLoader {
    fn get_size(
        &self,
        slice: Option<DataSlice>
    ) -> Result<Vec<usize>, AutoDiffError>;
fn get_item(
        &self,
        index: usize,
        slice: Option<DataSlice>
    ) -> Result<(Var, Var), AutoDiffError>;
fn get_batch(
        &self,
        start: usize,
        end: usize,
        slice: Option<DataSlice>
    ) -> Result<(Var, Var), AutoDiffError>; fn get_indexed_batch(
        &self,
        index: &[usize],
        slice: Option<DataSlice>
    ) -> Result<(Var, Var), AutoDiffError> { ... } }

Required methods

The shape of the data if applicable.

Return one sample.

Return a batch following original order.

Provided methods

Return a batch given the index.

Implementors