use burn_tensor::Device;
pub trait Batcher<I, O>: Send + Sync {
fn batch(&self, items: Vec<I>, device: &Device) -> O;
}
#[cfg(test)]
#[derive(new, Clone)]
pub struct TestBatcher;
#[cfg(test)]
impl<I> Batcher<I, Vec<I>> for TestBatcher {
fn batch(&self, items: Vec<I>, _device: &Device) -> Vec<I> {
items
}
}