pub trait Collate<T>: Default {
    type Output;

    fn collate(batch: Vec<T>) -> Self::Output;
}
Expand description

Any collate gather samples from one batch together.

A DefaultCollate struct is provided which will cover most of the use cases.

This trait is used instead of Fn because we cannot currently impl Fn* on struct on stable rust.

Required Associated Types

The type of the collate function’s output

Required Methods

Take a batch of samples and collate them

Implementors

NoOp for binairy, as pytorch default_collate function.