pub trait BatchPreTrain<U>: BatchPreTrainBase<U> + BatchForwardBase + BatchForward
where U: UnitValue<U>,
{ // Required method fn batch_pre_train( &self, input: Self::BatchInput ) -> Result<Self::BatchOutStack, TrainingError>; }
Expand description

Trait that defines an implementation that calculates the results of forward propagation prior to the error back propagation process of a neural network through batch processing.

Required Methods§

source

fn batch_pre_train( &self, input: Self::BatchInput ) -> Result<Self::BatchOutStack, TrainingError>

Perform forward propagation required to perform error back propagation

Arguments
  • input - input
Errors

This function may return the following errors

Implementors§

source§

impl<U, C, P, D, I, PI, S, const N: usize> BatchPreTrain<U> for BatchNormalizationLayer<U, C, P, D, I, PI, S, N>
where P: ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + PreTrain<U> + Loss<U> + BatchForwardBase<BatchInput = SerializedVec<U, I>, BatchOutput = SerializedVec<U, PI>> + BatchForward + BatchPreTrainBase<U> + BatchPreTrain<U>, U: Default + Clone + Copy + Send + UnitValue<U>, D: Device<U> + DeviceBatchNorm<U, C, S, N>, I: Debug + Send + Sync, S: Debug + Sized + 'static, for<'a> ArrView<'a, U, N>: From<&'a PI>, for<'a> PI: From<Arr<U, N>> + Debug + Send + Sync + 'static + SliceSize + MakeView<'a, U> + MakeViewMut<'a, U>, for<'a> SerializedVecView<'a, U, Arr<U, N>>: TryFrom<&'a SerializedVec<U, PI>, Error = SizeMismatchError>, SerializedVec<U, PI>: TryFrom<SerializedVecConverter<U, Arr<U, N>>, Error = SizeMismatchError>, Self: PreTrain<U>,

source§

impl<U, C, P, D, I, PI, const N: usize> BatchPreTrain<U> for BiasLayer<U, C, P, D, I, PI, N>
where P: ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + PreTrain<U> + Loss<U> + BatchForwardBase<BatchInput = SerializedVec<U, I>, BatchOutput = SerializedVec<U, PI>> + BatchForward + BatchPreTrainBase<U> + BatchPreTrain<U>, U: Default + Clone + Copy + Send + UnitValue<U>, D: Device<U> + DeviceBias<U, C, N>, I: Debug + Send + Sync, SerializedVec<U, PI>: TryFrom<SerializedVecConverter<U, Arr<U, N>>, Error = SizeMismatchError>, for<'a> PI: Debug + Send + Sync + SliceSize + MakeView<'a, U> + MakeViewMut<'a, U> + From<Arr<U, N>> + 'static, for<'a> ArrView<'a, U, N>: From<&'a PI>, for<'a> SerializedVecView<'a, U, Arr<U, N>>: TryFrom<&'a SerializedVec<U, PI>, Error = SizeMismatchError>,

source§

impl<U, C, P, D, I, PI, const NI: usize, const NO: usize> BatchPreTrain<U> for LinearLayer<U, C, P, D, I, PI, NI, NO>
where P: ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = Arr<U, NI>> + PreTrain<U> + Loss<U> + BatchForwardBase<BatchInput = SerializedVec<U, I>, BatchOutput = SerializedVec<U, PI>> + BatchForward + BatchPreTrainBase<U> + BatchPreTrain<U>, U: Default + Clone + Copy + Send + UnitValue<U>, D: Device<U> + DeviceLinear<U, C, NI, NO>, I: Debug + Send + Sync, PI: Debug + Send + Sync + From<Arr<U, NI>>, for<'a> ArrView<'a, U, NI>: From<&'a PI>, for<'a> SerializedVecView<'a, U, Arr<U, NI>>: TryFrom<&'a SerializedVec<U, PI>, Error = SizeMismatchError>,

source§

impl<U, O, LI> BatchPreTrain<U> for InputLayer<U, O, LI>
where U: UnitValue<U>, O: Debug + Send + Sync + 'static, LI: Debug,

source§

impl<U, P, A, I, PI, D, const N: usize> BatchPreTrain<U> for ActivationLayer<U, P, A, I, PI, D, N>
where P: PreTrain<U> + ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + Loss<U> + BatchForwardBase<BatchInput = SerializedVec<U, I>, BatchOutput = SerializedVec<U, PI>> + BatchPreTrainBase<U> + BatchPreTrain<U> + BatchBackward<U> + BatchLoss<U, BatchLossInput = SerializedVec<U, PI>>, U: Default + Clone + Copy + UnitValue<U>, D: Device<U>, for<'a> A: Activation<U, ArrView<'a, U, N>, Arr<U, N>, D> + BatchActivation<U, Arr<U, N>, SerializedVecView<'a, U, Arr<U, N>>, Arr<U, N>, D>, PI: Debug + Send + Sync + From<Arr<U, N>>, I: Debug + Send + Sync, for<'a> ArrView<'a, U, N>: From<&'a PI>, for<'a> SerializedVecView<'a, U, Arr<U, N>>: TryFrom<&'a SerializedVec<U, PI>, Error = SizeMismatchError>, SerializedVec<U, PI>: TryFrom<SerializedVecConverter<U, Arr<U, N>>, Error = SizeMismatchError>,

source§

impl<U, P, D, I, IO> BatchPreTrain<U> for LinearOutputLayer<U, P, D, I, IO>
where P: ForwardAll<Input = I, Output = IO> + BackwardAll<U, LossInput = IO> + PreTrain<U> + Loss<U> + BatchForwardBase<BatchInput = SerializedVec<U, I>, BatchOutput = SerializedVec<U, IO>> + BatchForward + BatchPreTrainBase<U> + BatchPreTrain<U>, U: Default + Clone + Copy + Send + UnitValue<U>, D: Device<U>, IO: Debug + Send + Sync + 'static, I: Debug + Send + Sync,

source§

impl<U, P, I, PI, CI, D> BatchPreTrain<U> for BridgeLayer<U, P, I, PI, CI, D>
where P: PreTrain<U> + ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + Loss<U> + BatchForwardBase<BatchInput = SerializedVec<U, I>, BatchOutput = SerializedVec<U, PI>> + BatchPreTrainBase<U> + BatchPreTrain<U> + BatchBackward<U> + BatchLoss<U, BatchLossInput = SerializedVec<U, PI>>, U: Default + Clone + Copy + UnitValue<U>, D: Device<U>, PI: Debug + Send + Sync + From<CI>, for<'a> CI: Debug + Send + Sync + SliceSize + AsRawSlice<U> + MakeView<'a, U> + MakeViewMut<'a, U> + 'static, I: Debug + Send + Sync, SerializedVec<U, PI>: TryFrom<SerializedVecConverter<U, CI>, Error = SizeMismatchError>,