Trait auto_diff_data_pipe::dataloader::DataLoader
source · [−]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.