Struct DeviceCpu

Source
pub struct DeviceCpu<U>
where U: UnitValue<U>,
{ /* private fields */ }
Expand description

Implementation of Device to be computed by CPU

Implementations§

Source§

impl<U> DeviceCpu<U>
where U: UnitValue<U>,

Source

pub fn new() -> Result<DeviceCpu<U>, DeviceError>

note: For the sake of implementation uniformity, DeviceCpu::new is defined as if it may return a DeviceError of type Result, but this error is never actually returned.

Trait Implementations§

Source§

impl<U, const N: usize> Activation<U, Arr<U, N>, Arr<U, N>, DeviceCpu<U>> for Identity<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, _: &DeviceCpu<U>, input: &Arr<U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, _: &DeviceCpu<U>, _: &Arr<U, N>, loss: &Arr<U, N>, _: &Arr<U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, const N: usize> Activation<U, Arr<U, N>, Arr<U, N>, DeviceCpu<U>> for ReLu<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &Arr<U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &Arr<U, N>, loss: &Arr<U, N>, u: &Arr<U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, const N: usize> Activation<U, Arr<U, N>, Arr<U, N>, DeviceCpu<U>> for Sigmoid<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &Arr<U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &Arr<U, N>, loss: &Arr<U, N>, u: &Arr<U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, const N: usize> Activation<U, Arr<U, N>, Arr<U, N>, DeviceCpu<U>> for SoftMax<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &Arr<U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &Arr<U, N>, loss: &Arr<U, N>, u: &Arr<U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, const N: usize> Activation<U, Arr<U, N>, Arr<U, N>, DeviceCpu<U>> for Swish<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &Arr<U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &Arr<U, N>, loss: &Arr<U, N>, u: &Arr<U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, const N: usize> Activation<U, Arr<U, N>, Arr<U, N>, DeviceCpu<U>> for Tanh<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &Arr<U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &Arr<U, N>, loss: &Arr<U, N>, u: &Arr<U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<'a, U, const N: usize> Activation<U, ArrView<'a, U, N>, Arr<U, N>, DeviceCpu<U>> for Identity<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, _: &DeviceCpu<U>, input: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, _: &DeviceCpu<U>, _: &ArrView<'a, U, N>, loss: &ArrView<'a, U, N>, _: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<'a, U, const N: usize> Activation<U, ArrView<'a, U, N>, Arr<U, N>, DeviceCpu<U>> for ReLu<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &ArrView<'a, U, N>, loss: &ArrView<'a, U, N>, u: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<'a, U, const N: usize> Activation<U, ArrView<'a, U, N>, Arr<U, N>, DeviceCpu<U>> for Sigmoid<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &ArrView<'a, U, N>, loss: &ArrView<'a, U, N>, u: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<'a, U, const N: usize> Activation<U, ArrView<'a, U, N>, Arr<U, N>, DeviceCpu<U>> for SoftMax<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &ArrView<'a, U, N>, loss: &ArrView<'a, U, N>, u: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<'a, U, const N: usize> Activation<U, ArrView<'a, U, N>, Arr<U, N>, DeviceCpu<U>> for Swish<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &ArrView<'a, U, N>, loss: &ArrView<'a, U, N>, u: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<'a, U, const N: usize> Activation<U, ArrView<'a, U, N>, Arr<U, N>, DeviceCpu<U>> for Tanh<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

fn apply( &self, device: &DeviceCpu<U>, input: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, device: &DeviceCpu<U>, o: &ArrView<'a, U, N>, loss: &ArrView<'a, U, N>, u: &ArrView<'a, U, N>, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, I, const N: usize> Activation<U, I, Arr<U, N>, DeviceCpu<U>> for Identity<U, DeviceCpu<U>>
where U: UnitValue<U>, I: Iterator<Item = U> + Clone,

Source§

fn apply(&self, _: &DeviceCpu<U>, input: &I) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, _: &DeviceCpu<U>, _: &I, loss: &I, _: &I, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, I, const N: usize> Activation<U, I, Arr<U, N>, DeviceCpu<U>> for ReLu<U, DeviceCpu<U>>
where U: UnitValue<U>, I: Iterator<Item = U> + Clone,

Source§

fn apply(&self, _: &DeviceCpu<U>, input: &I) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, _: &DeviceCpu<U>, _: &I, loss: &I, u: &I, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, I, const N: usize> Activation<U, I, Arr<U, N>, DeviceCpu<U>> for Sigmoid<U, DeviceCpu<U>>
where U: UnitValue<U>, I: Iterator<Item = U> + Clone,

Source§

fn apply(&self, _: &DeviceCpu<U>, input: &I) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, _: &DeviceCpu<U>, o: &I, loss: &I, _: &I, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, I, const N: usize> Activation<U, I, Arr<U, N>, DeviceCpu<U>> for SoftMax<U, DeviceCpu<U>>
where U: UnitValue<U>, I: Iterator<Item = U> + Clone,

Source§

fn apply(&self, _: &DeviceCpu<U>, input: &I) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, _: &DeviceCpu<U>, o: &I, loss: &I, _: &I, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, I, const N: usize> Activation<U, I, Arr<U, N>, DeviceCpu<U>> for Swish<U, DeviceCpu<U>>
where U: UnitValue<U>, I: Iterator<Item = U> + Clone,

Source§

fn apply(&self, _: &DeviceCpu<U>, input: &I) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, _: &DeviceCpu<U>, o: &I, loss: &I, u: &I, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, I, const N: usize> Activation<U, I, Arr<U, N>, DeviceCpu<U>> for Tanh<U, DeviceCpu<U>>
where U: UnitValue<U>, I: Iterator<Item = U> + Clone,

Source§

fn apply(&self, _: &DeviceCpu<U>, input: &I) -> Result<Arr<U, N>, EvaluateError>

Apply the activation function Read more
Source§

fn derive( &self, _: &DeviceCpu<U>, o: &I, loss: &I, _: &I, ) -> Result<Arr<U, N>, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, const N: usize> BatchActivation<U, SerializedVec<U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for Identity<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, _: &DeviceCpu<U>, input: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, _: &DeviceCpu<U>, _: &SerializedVec<U, Arr<U, N>>, loss: &SerializedVec<U, Arr<U, N>>, _: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<U, const N: usize> BatchActivation<U, SerializedVec<U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for ReLu<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVec<U, Arr<U, N>>, loss: &SerializedVec<U, Arr<U, N>>, u: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<U, const N: usize> BatchActivation<U, SerializedVec<U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for Sigmoid<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVec<U, Arr<U, N>>, loss: &SerializedVec<U, Arr<U, N>>, u: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<U, const N: usize> BatchActivation<U, SerializedVec<U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for SoftMax<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVec<U, Arr<U, N>>, loss: &SerializedVec<U, Arr<U, N>>, u: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<U, const N: usize> BatchActivation<U, SerializedVec<U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for Swish<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVec<U, Arr<U, N>>, loss: &SerializedVec<U, Arr<U, N>>, u: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<U, const N: usize> BatchActivation<U, SerializedVec<U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for Tanh<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVec<U, Arr<U, N>>, loss: &SerializedVec<U, Arr<U, N>>, u: &SerializedVec<U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<'a, U, const N: usize> BatchActivation<U, SerializedVecView<'a, U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for Identity<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, _: &DeviceCpu<U>, input: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, _: &DeviceCpu<U>, _: &SerializedVecView<'a, U, Arr<U, N>>, loss: &SerializedVecView<'a, U, Arr<U, N>>, _: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<'a, U, const N: usize> BatchActivation<U, SerializedVecView<'a, U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for ReLu<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVecView<'a, U, Arr<U, N>>, loss: &SerializedVecView<'a, U, Arr<U, N>>, u: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<'a, U, const N: usize> BatchActivation<U, SerializedVecView<'a, U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for Sigmoid<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVecView<'a, U, Arr<U, N>>, loss: &SerializedVecView<'a, U, Arr<U, N>>, u: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<'a, U, const N: usize> BatchActivation<U, SerializedVecView<'a, U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for SoftMax<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVecView<'a, U, Arr<U, N>>, loss: &SerializedVecView<'a, U, Arr<U, N>>, u: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<'a, U, const N: usize> BatchActivation<U, SerializedVecView<'a, U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for Swish<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVecView<'a, U, Arr<U, N>>, loss: &SerializedVecView<'a, U, Arr<U, N>>, u: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<'a, U, const N: usize> BatchActivation<U, SerializedVecView<'a, U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, DeviceCpu<U>> for Tanh<U, DeviceCpu<U>>
where U: UnitValue<U>, Vec<Arr<U, N>>: FromParallelIterator<Arr<U, N>>,

Source§

fn batch_apply( &self, device: &DeviceCpu<U>, input: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, device: &DeviceCpu<U>, o: &SerializedVecView<'a, U, Arr<U, N>>, loss: &SerializedVecView<'a, U, Arr<U, N>>, u: &SerializedVecView<'a, U, Arr<U, N>>, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Apply derivatives of the activation function Read more
Source§

impl<U, P, OP, I, PI, const N: usize> BatchNormalizationLayerInstantiation<U, Arr<U, N>, P, OP, DeviceCpu<U>, I, PI, Arr<U, N>, N> for BatchNormalizationLayer<U, Arr<U, N>, P, OP, DeviceCpu<U>, I, PI, Arr<U, N>, N>
where P: ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + PreTrain<U> + Loss<U>, U: Default + Clone + Copy + Send + UnitValue<U>, I: Debug + Send + Sync, OP: Optimizer<U, DeviceCpu<U>>,

Source§

fn with_params<B: OptimizerBuilder<U, DeviceCpu<U>, Output = OP>>( parent: P, device: &DeviceCpu<U>, scale: Arr<U, N>, bias: Arr<U, N>, momentum: U, b: &B, ) -> Result<BatchNormalizationLayer<U, Arr<U, N>, P, OP, DeviceCpu<U>, I, PI, Arr<U, N>, N>, LayerInstantiationError>

Create and return an instance with the specified scale, bias, and momentum. Read more
Source§

fn with_momentum<B: OptimizerBuilder<U, DeviceCpu<U>, Output = OP>>( parent: P, device: &DeviceCpu<U>, momentum: U, b: &B, ) -> Result<BatchNormalizationLayer<U, Arr<U, N>, P, OP, DeviceCpu<U>, I, PI, Arr<U, N>, N>, LayerInstantiationError>

Create and return an instance with the momentum. Read more
Source§

fn new<B: OptimizerBuilder<U, DeviceCpu<U>, Output = OP>>( parent: P, device: &DeviceCpu<U>, b: &B, ) -> Result<BatchNormalizationLayer<U, Arr<U, N>, P, OP, DeviceCpu<U>, I, PI, Arr<U, N>, N>, LayerInstantiationError>

Create and return an instance. Read more
Source§

impl<U, P, OP, I, PI, const N: usize> BiasLayerInstantiation<U, Arr<U, N>, P, OP, DeviceCpu<U>, I, PI, N> for BiasLayer<U, Arr<U, N>, P, OP, DeviceCpu<U>, I, PI, N>
where P: ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + PreTrain<U> + Loss<U>, U: Default + Clone + Copy + Send + UnitValue<U>, I: Debug + Send + Sync, PI: Debug + BatchDataType, OP: Optimizer<U, DeviceCpu<U>>,

Source§

fn instantiation<UI: FnMut() -> U, B: OptimizerBuilder<U, DeviceCpu<U>, Output = OP>>( parent: P, device: &DeviceCpu<U>, ui: UI, b: &B, ) -> Result<BiasLayer<U, Arr<U, N>, P, OP, DeviceCpu<U>, I, PI, N>, LayerInstantiationError>

Create and return an instance with the specified scale, bias, and momentum. Read more
Source§

impl<U> Clone for DeviceCpu<U>
where U: UnitValue<U>,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, U, I, A, const N: usize> DeviceActivation<U, I, A, N> for DeviceCpu<U>
where U: UnitValue<U>, I: BatchDataType + From<Arr<U, N>>, SerializedVec<U, Arr<U, N>>: IntoConverter, <I as BatchDataType>::Type: TryFrom<<SerializedVec<U, Arr<U, N>> as IntoConverter>::Converter, Error = TypeConvertError>, for<'b, 'b> A: Activation<U, ArrView<'b, U, N>, Arr<U, N>, Self> + BatchActivation<U, SerializedVecView<'b, U, Arr<U, N>>, SerializedVec<U, Arr<U, N>>, Self>, for<'b> ArrView<'b, U, N>: From<&'b I>, for<'b> SerializedVecView<'b, U, Arr<U, N>>: TryFrom<&'b <I as BatchDataType>::Type, Error = TypeConvertError>,

Source§

fn apply(&self, f: &A, input: &I) -> Result<I, EvaluateError>

Apply the activation function Read more
Source§

fn derive(&self, f: &A, o: &I, loss: &I, u: &I) -> Result<I, TrainingError>

Apply derivatives of the activation function Read more
Source§

fn batch_apply( &self, f: &A, input: &<I as BatchDataType>::Type, ) -> Result<<I as BatchDataType>::Type, TrainingError>

Apply the activation function Read more
Source§

fn batch_derive( &self, f: &A, o: &<I as BatchDataType>::Type, loss: &<I as BatchDataType>::Type, u: &<I as BatchDataType>::Type, ) -> Result<<I as BatchDataType>::Type, TrainingError>

Apply derivatives of the activation function Read more
Returns whether or not the canonical linkage function can be used. Read more
Source§

impl<U, I, const N: usize> DeviceBatchNorm<U, Arr<U, N>, I, N> for DeviceCpu<U>
where U: UnitValue<U>, I: BatchDataType + Debug + From<Arr<U, N>> + 'static, <I as BatchDataType>::Type: Debug + 'static + TryFrom<<SerializedVec<U, Arr<U, N>> as IntoConverter>::Converter, Error = TypeConvertError>, SerializedVec<U, Arr<U, N>>: IntoConverter, for<'a> ArrView<'a, U, N>: From<&'a I>, for<'a> SerializedVecView<'a, U, Arr<U, N>>: TryFrom<&'a <I as BatchDataType>::Type, Error = TypeConvertError>,

Source§

fn forward_batch_norm<'a>( &self, input: &'a I, scale: &Arr<U, N>, bias: &Arr<U, N>, estimated_mean: &Arr<U, N>, estimated_variance: &Arr<U, N>, ) -> Result<I, EvaluateError>

Forward propagation calculation Read more
Source§

fn forward_batch_norm_train<'a>( &self, input: &'a I, scale: &Arr<U, N>, bias: &Arr<U, N>, estimated_mean: &Arr<U, N>, estimated_variance: &Arr<U, N>, ) -> Result<(I, Arr<U, N>, Arr<U, N>), EvaluateError>

Forward propagation calculation (implemented in training mode) Read more
Source§

fn batch_forward_batch_norm<'a>( &self, input: &'a <I as BatchDataType>::Type, scale: &Arr<U, N>, bias: &Arr<U, N>, estimated_mean: &Arr<U, N>, estimated_variance: &Arr<U, N>, ) -> Result<<I as BatchDataType>::Type, EvaluateError>

Forward propagation calculation in batch Read more
Source§

fn batch_forward_batch_norm_train<'a>( &self, input: &'a <I as BatchDataType>::Type, scale: &Arr<U, N>, bias: &Arr<U, N>, running_mean: &Arr<U, N>, running_variance: &Arr<U, N>, momentum: U, ) -> Result<(<I as BatchDataType>::Type, Arr<U, N>, Arr<U, N>, Arr<U, N>, Arr<U, N>), TrainingError>

Forward propagation calculation in batch (implemented in training mode) Read more
Source§

fn backward_batch_norm<'a>( &self, loss: &'a I, input: &'a I, scale: &Arr<U, N>, saved_mean: &Arr<U, N>, saved_inv_variance: &Arr<U, N>, ) -> Result<(I, Arr<U, N>, Arr<U, N>), TrainingError>

Error back propagation calculation Read more
Source§

fn batch_backward_batch_norm<'a>( &self, loss: &'a <I as BatchDataType>::Type, input: &'a <I as BatchDataType>::Type, scale: &Arr<U, N>, saved_mean: &Arr<U, N>, saved_inv_variance: &Arr<U, N>, ) -> Result<(<I as BatchDataType>::Type, Arr<U, N>, Arr<U, N>), TrainingError>

Error back propagation calculation in batch Read more
Source§

impl<U, IO, const N: usize> DeviceBias<U, Arr<U, N>, IO, N> for DeviceCpu<U>
where U: UnitValue<U>, IO: BatchDataType + Debug + Clone + From<Arr<U, N>>, <IO as BatchDataType>::Type: BatchSize + Debug + TryFrom<<SerializedVec<U, Arr<U, N>> as IntoConverter>::Converter, Error = TypeConvertError>, Arr<U, N>: From<IO>, SerializedVec<U, Arr<U, N>>: IntoConverter, for<'a> ArrView<'a, U, N>: From<&'a IO>, for<'a> SerializedVecView<'a, U, Arr<U, N>>: TryFrom<&'a <IO as BatchDataType>::Type, Error = TypeConvertError>, Self: DeviceReduce<<IO as BatchDataType>::Type, Arr<U, N>, U, N>,

Source§

fn forward_bias<'a>( &self, bias: &Arr<U, N>, input: &'a IO, ) -> Result<IO, EvaluateError>

Forward propagation calculation Read more
Source§

fn backward_bias<'a>(&self, input: IO) -> Result<IO, TrainingError>

Error back propagation calculation Read more
Source§

fn backward_bias_weight_gradient<'a>( &self, loss: &'a IO, ) -> Result<Arr<U, N>, TrainingError>

Calculate the gradient of the weights Read more
Source§

fn batch_forward_bias<'a>( &self, bias: &Arr<U, N>, input: &'a <IO as BatchDataType>::Type, ) -> Result<<IO as BatchDataType>::Type, TrainingError>

Forward propagation calculation in batch Read more
Source§

fn batch_backward_bias<'a>( &self, input: <IO as BatchDataType>::Type, ) -> Result<<IO as BatchDataType>::Type, TrainingError>

Error back propagation in batch Read more
Source§

fn batch_backward_bias_weight_gradient<'a>( &self, loss: &'a <IO as BatchDataType>::Type, ) -> Result<Arr<U, N>, TrainingError>

Calculate the gradient of the weights in batch Read more
Source§

impl<U, const NI: usize, const NO: usize> DeviceDiffLinear<U, Arr2<U, NI, NO>, Arr<U, NO>, NI, NO> for DeviceCpu<U>
where U: UnitValue<U>,

Source§

type Output = Arr<U, NO>

Source§

fn forward_diff_linear<'a>( &self, units: &Arr2<U, NI, NO>, bias: &Arr<U, NO>, input: &'a DiffInput<DiffArr<U, NI>, U, NI, NO>, ) -> Result<Arr<U, NO>, EvaluateError>

Source§

fn backward_diff_weight_gradient<'a>( &self, o: &'a DiffInput<DiffArr<U, NI>, U, NI, NO>, loss: &'a Arr<U, NO>, ) -> Result<Arr2<U, NI, NO>, TrainingError>

Source§

impl<U, I> DeviceInput<U, I> for DeviceCpu<U>
where U: UnitValue<U>, I: BatchDataType + Debug + 'static, <I as BatchDataType>::Type: Debug + 'static,

Source§

type Output = I

Source§

type BatchOutput = <I as BatchDataType>::Type

Source§

fn forward_input(&self, input: I) -> Result<Self::Output, TypeConvertError>

Type conversion during forward propagation Read more
Source§

fn batch_forward_input( &self, input: <I as BatchDataType>::Type, ) -> Result<Self::BatchOutput, TypeConvertError>

Type conversion during forward propagation in batch Read more
Source§

impl<U, I, const NI: usize, const NO: usize> DeviceLinear<U, Arr2<U, NI, NO>, Arr<U, NO>, I, NI, NO> for DeviceCpu<U>
where U: UnitValue<U>, I: BatchDataType + From<Arr<U, NI>> + Debug + 'static, <I as BatchDataType>::Type: Debug + 'static + TryFrom<<SerializedVec<U, Arr<U, NI>> as IntoConverter>::Converter, Error = TypeConvertError>, SerializedVec<U, Arr<U, NI>>: IntoConverter, for<'a> ArrView<'a, U, NI>: From<&'a I>, for<'a> SerializedVecView<'a, U, Arr<U, NI>>: TryFrom<&'a <I as BatchDataType>::Type, Error = TypeConvertError>, Self: DeviceReduce<SerializedVec<U, Arr<U, NO>>, Arr<U, NO>, U, NO>,

Source§

type Output = Arr<U, NO>

Source§

type BatchOutput = <Arr<U, NO> as BatchDataType>::Type

Source§

type LossOutput = I

Source§

type BatchLossOutput = <I as BatchDataType>::Type

Source§

fn forward_linear<'a>( &self, bias: &Arr<U, NO>, units: &Arr2<U, NI, NO>, input: &'a I, ) -> Result<Arr<U, NO>, EvaluateError>

Forward propagation calculation Read more
Source§

fn backward_linear<'a>( &self, units: &Arr2<U, NI, NO>, input: &'a Arr<U, NO>, ) -> Result<I, TrainingError>

Error back propagation calculation Read more
Source§

fn backward_weight_gradient<'a>( &self, o: &'a I, loss: &'a Arr<U, NO>, ) -> Result<Arr2<U, NI, NO>, TrainingError>

Calculate the gradient of the weights Read more
Source§

fn backward_bias_weight_gradient<'a>( &self, loss: Self::Output, ) -> Result<Arr<U, NO>, TrainingError>

Calculate the gradient of the bias weights Read more
Source§

fn batch_backward_linear<'a>( &self, units: &Arr2<U, NI, NO>, input: &'a SerializedVec<U, Arr<U, NO>>, ) -> Result<<I as BatchDataType>::Type, TrainingError>

Error back propagation in batch Read more
Source§

fn batch_forward_linear<'a>( &self, bias: &Arr<U, NO>, units: &Arr2<U, NI, NO>, input: &'a <I as BatchDataType>::Type, ) -> Result<SerializedVec<U, Arr<U, NO>>, TrainingError>

Forward propagation calculation in batch Read more
Source§

fn batch_backward_weight_gradient<'a>( &self, o: &'a <I as BatchDataType>::Type, loss: &'a SerializedVec<U, Arr<U, NO>>, ) -> Result<Arr2<U, NI, NO>, TrainingError>

Calculate the gradient of the weights in batch Read more
Source§

fn batch_linear_reduce<'a>( &self, loss: &'a SerializedVec<U, Arr<U, NO>>, ) -> Result<Arr<U, NO>, TrainingError>

convolutional calculation Read more
Source§

impl<'a, U, const N: usize> DeviceLinearOutput<'a, U, N> for DeviceCpu<U>
where U: UnitValue<U>,

Source§

type IO = Arr<U, N>

Source§

type BatchIO = SerializedVec<U, Arr<U, N>>

Source§

fn loss_linear<L>( &self, expected: &'a Arr<U, N>, actual: &'a Arr<U, N>, lossf: &L, ) -> Result<Arr<U, N>, TrainingError>
where L: LossFunction<U> + LossFunctionLinear<'a, U, Arr<U, N>, DeviceCpu<U>, N, Output = Arr<U, N>>,

Calculation of Losses Read more
Calculation of Losses by canonical link Read more
Source§

fn loss_linear_total<L: LossFunction<U>>( &self, exptected: &'a Arr<U, N>, actual: &'a Arr<U, N>, lossf: &L, ) -> Result<U, TrainingError>

Calculation of total Losses Read more
Calculation of loss during batch execution by canonical link Read more
Source§

fn batch_loss_linear<L>( &self, expected: &'a SerializedVec<U, Arr<U, N>>, actual: &'a SerializedVec<U, Arr<U, N>>, lossf: &L, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>
where L: LossFunction<U> + BatchLossFunctionLinear<'a, U, Self::BatchIO, DeviceCpu<U>, N, Output = Self::BatchIO>,

Calculation of Losses (all batch) Read more
Source§

fn batch_loss_linear_total<L: LossFunction<U>>( &self, exptected: &'a SerializedVec<U, Arr<U, N>>, actual: &'a SerializedVec<U, Arr<U, N>>, lossf: &L, ) -> Result<U, TrainingError>
where f64: From<U> + FromPrimitive,

Calculation of total Losses (all batch) Read more
Source§

impl<U, T, const N: usize> DeviceReduce<T, Arr<U, N>, U, N> for DeviceCpu<U>
where U: UnitValue<U> + Debug, for<'a> SerializedVecView<'a, U, Arr<U, N>>: TryFrom<&'a T, Error = TypeConvertError>,

Source§

fn reduce<'a>(&self, input: &'a T) -> Result<Arr<U, N>, TrainingError>

Convolutional computation of input Read more
Source§

impl<U, P, OP, I, const NI: usize, const NO: usize> DiffLinearLayerInstantiation<U, Arr2<U, NI, NO>, Arr<U, NO>, P, OP, DeviceCpu<U>, I, NI, NO> for DiffLinearLayer<U, Arr2<U, NI, NO>, Arr<U, NO>, P, OP, DeviceCpu<U>, I, NI, NO>
where P: ForwardAll<Input = I, Output = DiffInput<DiffArr<U, NI>, U, NI, NO>> + BackwardAll<U, LossInput = ()> + PreTrain<U> + Loss<U>, U: Default + Clone + Copy + UnitValue<U>, I: Debug + Send + Sync, OP: Optimizer<U, DeviceCpu<U>>,

Source§

fn instantiation<UI: FnMut() -> U, BI: FnMut() -> U, B: OptimizerBuilder<U, DeviceCpu<U>, Output = OP>>( parent: P, device: &DeviceCpu<U>, ui: UI, bi: BI, b: &B, ) -> Result<DiffLinearLayer<U, Arr2<U, NI, NO>, Arr<U, NO>, P, OP, DeviceCpu<U>, I, NI, NO>, LayerInstantiationError>

Create an instance of DiffLinearLayers Read more
Source§

impl<U, P, I, PI, OP, const NI: usize, const NO: usize> LinearLayerInstantiation<U, Arr2<U, NI, NO>, Arr<U, NO>, P, DeviceCpu<U>, I, PI, OP, NI, NO> for LinearLayer<U, Arr2<U, NI, NO>, Arr<U, NO>, P, DeviceCpu<U>, I, PI, OP, NI, NO>
where P: ForwardAll<Input = I, Output = PI> + BackwardAll<U, LossInput = PI> + PreTrain<U, PreOutput = PI> + Loss<U>, U: Default + Clone + Copy + UnitValue<U>, I: Debug + Send + Sync, PI: Debug, OP: Optimizer<U, DeviceCpu<U>>,

Source§

fn instantiation<B: OptimizerBuilder<U, DeviceCpu<U>, Output = OP>>( parent: P, device: &DeviceCpu<U>, ui: impl FnMut() -> U, bi: impl FnMut() -> U, b: &B, ) -> Result<LinearLayer<U, Arr2<U, NI, NO>, Arr<U, NO>, P, DeviceCpu<U>, I, PI, OP, NI, NO>, LayerInstantiationError>

Create an instance of LinearLayers Read more
Source§

impl<U> Optimizer<U, DeviceCpu<U>> for Adagrad<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

type InternalType = [U]

Source§

type InternalUpdateType<'a> = ShieldSlice<'a, U>

Source§

fn update<'a>( &mut self, e: &[U], w: Self::InternalUpdateType<'a>, ) -> Result<(), TrainingError>

Update Weights Read more
Source§

impl<U> Optimizer<U, DeviceCpu<U>> for Adam<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

type InternalType = [U]

Source§

type InternalUpdateType<'a> = ShieldSlice<'a, U>

Source§

fn update<'a>( &mut self, e: &'a [U], w: Self::InternalUpdateType<'a>, ) -> Result<(), TrainingError>

Update Weights Read more
Source§

impl<U> Optimizer<U, DeviceCpu<U>> for MomentumSGD<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

type InternalType = [U]

Source§

type InternalUpdateType<'a> = ShieldSlice<'a, U>

Source§

fn update<'a>( &mut self, e: &[U], w: Self::InternalUpdateType<'a>, ) -> Result<(), TrainingError>

Update Weights Read more
Source§

impl<U> Optimizer<U, DeviceCpu<U>> for RMSprop<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

type InternalType = [U]

Source§

type InternalUpdateType<'a> = ShieldSlice<'a, U>

Source§

fn update<'a>( &mut self, e: &'a [U], w: Self::InternalUpdateType<'a>, ) -> Result<(), TrainingError>

Update Weights Read more
Source§

impl<U> Optimizer<U, DeviceCpu<U>> for SGD<U, DeviceCpu<U>>
where U: UnitValue<U>, DeviceCpu<U>: Device<U>,

Source§

type InternalType = [U]

Source§

type InternalUpdateType<'a> = ShieldSlice<'a, U>

Source§

fn update<'a>( &mut self, e: &'a [U], w: Self::InternalUpdateType<'a>, ) -> Result<(), TrainingError>

Update Weights Read more
Source§

impl<U> OptimizerBuilder<U, DeviceCpu<U>> for AdagradBuilder<U, DeviceCpu<U>>
where U: UnitValue<U>, Adagrad<U, DeviceCpu<U>>: Optimizer<U, DeviceCpu<U>>,

Source§

type Output = Adagrad<U, DeviceCpu<U>>

Source§

fn build(&self, size: usize) -> Result<Self::Output, OptimizerBuildError>

Create and return an optimizer Read more
Source§

impl<U> OptimizerBuilder<U, DeviceCpu<U>> for AdamBuilder<U, DeviceCpu<U>>
where U: UnitValue<U>, Adam<U, DeviceCpu<U>>: Optimizer<U, DeviceCpu<U>>,

Source§

type Output = Adam<U, DeviceCpu<U>>

Source§

fn build(&self, size: usize) -> Result<Self::Output, OptimizerBuildError>

Create and return an optimizer Read more
Source§

impl<U> OptimizerBuilder<U, DeviceCpu<U>> for MomentumSGDBuilder<U, DeviceCpu<U>>
where U: UnitValue<U>, MomentumSGD<U, DeviceCpu<U>>: Optimizer<U, DeviceCpu<U>>,

Source§

type Output = MomentumSGD<U, DeviceCpu<U>>

Source§

fn build(&self, size: usize) -> Result<Self::Output, OptimizerBuildError>

Create and return an optimizer Read more
Source§

impl<U> OptimizerBuilder<U, DeviceCpu<U>> for RMSpropBuilder<U, DeviceCpu<U>>
where U: UnitValue<U>, RMSprop<U, DeviceCpu<U>>: Optimizer<U, DeviceCpu<U>>,

Source§

type Output = RMSprop<U, DeviceCpu<U>>

Source§

fn build(&self, size: usize) -> Result<Self::Output, OptimizerBuildError>

Create and return an optimizer Read more
Source§

impl<U> OptimizerState<U, DeviceCpu<U>> for Adagrad<U, DeviceCpu<U>>
where U: UnitValue<U>, DeviceCpu<U>: Device<U>,

Source§

type Type = Box<[U]>

State type
Source§

impl<U> OptimizerState<U, DeviceCpu<U>> for Adam<U, DeviceCpu<U>>
where U: UnitValue<U>, DeviceCpu<U>: Device<U>,

Source§

type Type = Box<[U]>

State type
Source§

impl<U> OptimizerState<U, DeviceCpu<U>> for MomentumSGD<U, DeviceCpu<U>>
where U: UnitValue<U>, DeviceCpu<U>: Device<U>,

Source§

type Type = Box<[U]>

State type
Source§

impl<U> OptimizerState<U, DeviceCpu<U>> for RMSprop<U, DeviceCpu<U>>
where U: UnitValue<U>, DeviceCpu<U>: Device<U>,

Source§

type Type = Box<[U]>

State type
Source§

impl<U> Device<U> for DeviceCpu<U>
where U: UnitValue<U>,

Auto Trait Implementations§

§

impl<U> Freeze for DeviceCpu<U>

§

impl<U> RefUnwindSafe for DeviceCpu<U>
where U: RefUnwindSafe,

§

impl<U> Send for DeviceCpu<U>

§

impl<U> Sync for DeviceCpu<U>

§

impl<U> Unpin for DeviceCpu<U>
where U: Unpin,

§

impl<U> UnwindSafe for DeviceCpu<U>
where U: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, U, I, const N: usize> BatchLossFunctionLinear<'a, U, I, DeviceCpu<U>, N> for T
where T: LossFunction<U>, U: UnitValue<U>, I: BatchSize, SerializedVecView<'b, U, Arr<U, N>>: for<'b> TryFrom<&'b I, Error = TypeConvertError>,

Source§

type Output = SerializedVec<U, Arr<U, N>>

Source§

fn batch_linear_derive<'b>( &self, _: &DeviceCpu<U>, expected: &'b I, actual: &'b I, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>

Differentiation of loss functions Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, T, U, I, const N: usize> LossFunctionLinear<'a, U, I, DeviceCpu<U>, N> for T
where T: LossFunction<U>, U: UnitValue<U>, ArrView<'b, U, N>: for<'b> From<&'b I>,

Source§

type Output = Arr<U, N>

Source§

fn linear_derive<'b>( &self, _: &DeviceCpu<U>, actual: &'b I, expected: &'b I, ) -> Result<Arr<U, N>, TrainingError>

Differentiation of loss functions Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.