pub trait BatchLossFunctionLinear<'a, U, I, D, const N: usize>:
LossFunction<U>
+ Send
+ Sync
+ 'static{
type Output: BatchSize;
// Required method
fn batch_linear_derive<'b>(
&self,
_: &D,
expected: &'b I,
actual: &'b I,
) -> Result<Self::Output, TrainingError>;
}
Expand description
Trait defining the implementation of a linear layer loss function with batch processing