ParamsBase

Struct ParamsBase 

Source
pub struct ParamsBase<S, D = Ix2, A = <S as RawData>::Elem>
where D: Dimension, S: RawData<Elem = A>,
{ pub bias: ArrayBase<S, D::Smaller, A>, pub weights: ArrayBase<S, D, A>, }
Expand description

The ParamsBase implementation aims to provide a generic, n-dimensional weight and bias pair for a model (or layer). The object requires the bias tensor to be a single dimension smaller than the weights tensor.

Therefore, we allow the weight tensor to be the shape of the parameters, using the shape as the basis for the bias tensor by removing the first axis. Consequently, this constrains the ParamsBase implementation to only support dimensions that can be reduced by one axis, typically the “zero-th” axis: $\text{rank}(D)$.

Fields§

§bias: ArrayBase<S, D::Smaller, A>§weights: ArrayBase<S, D, A>

Implementations§

Source§

impl<A, S, D> ParamsBase<S, D, A>
where D: Dimension, S: RawData<Elem = A>,

Source

pub const fn new( bias: ArrayBase<S, D::Smaller, A>, weights: ArrayBase<S, D, A>, ) -> Self

create a new instance of the ParamsBase with the given bias and weights

Source

pub fn init_from_fn<Sh, F>(shape: Sh, init: F) -> Self
where A: Clone, D: RemoveAxis, S: DataOwned, Sh: ShapeBuilder<Dim = D>, F: Fn() -> A,

returns a new instance of the ParamsBase using the initialization routine

Source

pub fn from_shape_fn<Sh, F1, F2>(shape: Sh, w: F1, b: F2) -> Self
where A: Clone, D: RemoveAxis, S: DataOwned, Sh: ShapeBuilder<Dim = D>, D::Smaller: Dimension + ShapeArg, F1: Fn(<D as Dimension>::Pattern) -> A, F2: Fn(<D::Smaller as Dimension>::Pattern) -> A,

returns a new instance of the ParamsBase initialized use the given shape_function

Source

pub fn from_bias<Sh>(shape: Sh, bias: ArrayBase<S, D::Smaller, A>) -> Self
where A: Clone + Default, D: RemoveAxis, S: DataOwned, Sh: ShapeBuilder<Dim = D>,

create a new instance of the ParamsBase with the given bias used the default weights

Source

pub fn from_weights(weights: ArrayBase<S, D, A>) -> Self
where A: Clone + Default, D: RemoveAxis, S: DataOwned,

create a new instance of the ParamsBase with the given weights used the default bias

Source

pub fn from_elem<Sh: ShapeBuilder<Dim = D>>(shape: Sh, elem: A) -> Self
where A: Clone, D: RemoveAxis, S: DataOwned,

create a new instance of the ParamsBase from the given shape and element;

Source

pub fn default<Sh>(shape: Sh) -> Self
where A: Clone + Default, D: RemoveAxis, S: DataOwned, Sh: ShapeBuilder<Dim = D>,

create an instance of the parameters with all values set to the default value

Source

pub fn ones<Sh>(shape: Sh) -> Self
where A: Clone + One, D: RemoveAxis, S: DataOwned, Sh: ShapeBuilder<Dim = D>,

initialize the parameters with all values set to zero

Source

pub fn zeros<Sh>(shape: Sh) -> Self
where A: Clone + Zero, D: RemoveAxis, S: DataOwned, Sh: ShapeBuilder<Dim = D>,

create an instance of the parameters with all values set to zero

Source

pub const fn bias(&self) -> &ArrayBase<S, D::Smaller, A>

returns an immutable reference to the bias

Source

pub const fn bias_mut(&mut self) -> &mut ArrayBase<S, D::Smaller, A>

returns a mutable reference to the bias

Source

pub const fn weights(&self) -> &ArrayBase<S, D, A>

returns an immutable reference to the weights

Source

pub const fn weights_mut(&mut self) -> &mut ArrayBase<S, D, A>

returns a mutable reference to the weights

Source

pub fn bias_as_raw_ref(&self) -> &RawRef<A, D::Smaller>
where S: Data,

returns a raw reference to the bias tensor

Source

pub fn weights_as_raw_ref(&self) -> &RawRef<A, D>
where S: Data,

returns a raw reference of the weights

Source

pub fn bias_layout_ref(&self) -> &LayoutRef<A, D::Smaller>
where S: Data,

returns an immutable rererence to the bias as a layout reference

Source

pub fn bias_layout_ref_mut(&mut self) -> &mut LayoutRef<A, D::Smaller>
where S: DataMut,

returns a mutable rererence to the weights as a layout reference

Source

pub fn weights_layout_ref(&self) -> &LayoutRef<A, D>
where S: Data,

returns an immutable rererence to the weights as a layout reference

Source

pub fn weights_layout_ref_mut(&mut self) -> &mut LayoutRef<A, D>
where S: DataMut,

returns a mutable rererence to the weights as a layout reference

Source

pub fn assign_bias(&mut self, bias: &ArrayBase<S, D::Smaller, A>) -> &mut Self
where A: Clone, S: DataMut,

assign the bias

Source

pub fn assign_weights(&mut self, weights: &ArrayBase<S, D, A>) -> &mut Self
where A: Clone, S: DataMut,

assign the weights

Source

pub fn replace_bias( &mut self, bias: ArrayBase<S, D::Smaller, A>, ) -> ArrayBase<S, D::Smaller, A>

replace the bias and return the previous state; uses replace

Source

pub fn replace_weights( &mut self, weights: ArrayBase<S, D, A>, ) -> ArrayBase<S, D, A>

replace the weights and return the previous state; uses replace

Source

pub fn set_bias(&mut self, bias: ArrayBase<S, D::Smaller, A>) -> &mut Self

set the bias

Source

pub fn set_weights(&mut self, weights: ArrayBase<S, D, A>) -> &mut Self

set the weights

Source

pub fn dim(&self) -> D::Pattern

returns the dimensions of the weights

Source

pub fn is_empty(&self) -> bool

returns true if both the weights and bias are empty; uses is_empty

Source

pub fn is_weights_empty(&self) -> bool

returns true if the weights are empty

Source

pub fn is_bias_empty(&self) -> bool

returns true if the bias is empty

Source

pub fn count_weights(&self) -> usize

the total number of elements within the weight tensor

Source

pub fn count_bias(&self) -> usize

the total number of elements within the bias tensor

Source

pub fn raw_dim(&self) -> D

returns the raw dimensions of the weights;

Source

pub fn shape<'a>(&'a self) -> &'a [usize]
where A: 'a,

returns the shape of the parameters; uses the shape of the weight tensor

Source

pub fn shape_bias(&self) -> &[usize]
where A: 'static,

returns the shape of the bias tensor; the shape should be equivalent to that of the weight tensor minus the “zero-th” axis

Source

pub fn size(&self) -> usize

returns the total number of parameters within the layer

Source

pub fn to_owned(&self) -> Params<A, D>
where A: Clone, S: DataOwned,

returns an owned instance of the parameters

Source

pub fn to_shape<Sh>( &self, shape: Sh, ) -> Result<ParamsBase<CowRepr<'_, A>, Sh::Dim>>
where A: Clone, S: DataOwned, Sh: ShapeBuilder<Dim = D>, Sh::Dim: Dimension + RemoveAxis,

change the shape of the parameters; the shape of the bias parameters is determined by removing the “zero-th” axis of the given shape

Source

pub fn to_shared(&self) -> ParamsBase<OwnedArcRepr<A>, D>
where A: Clone, S: Data,

returns a new ParamsBase instance with the same paramaters, but using a shared representation of the data;

Source

pub fn view(&self) -> ParamsBase<ViewRepr<&A>, D>
where S: Data,

returns a “view” of the parameters; see view for more information

Source

pub fn view_mut(&mut self) -> ParamsBase<ViewRepr<&mut A>, D>
where S: DataMut,

returns mutable view of the parameters

Source

pub fn clamp(&mut self, min: A, max: A) -> Params<A, D>
where A: 'static + Clone + PartialOrd, S: Data,

clamps all values within the parameters between the given min and max values

Source

pub fn mapv<F, U>(&self, f: F) -> Params<U, D>
where A: Clone, S: Data, F: Fn(A) -> U,

applies the given function onto each element, capturing the results in a new instance

Source§

impl<A, S, D> ParamsBase<S, D, A>
where S: RawData<Elem = A>, D: Dimension,

Here, we implement various iterators for the parameters and its constituents. The core iterators are:

  • immutable and mutable iterators over each parameter (weights and bias) respectively;
  • an iterator over the parameters, which zips together an axis iterator over the columns of the weights and an iterator over the bias;
Source

pub fn iter(&self) -> ParamsIter<'_, A, D>
where D: RemoveAxis, S: Data,

an iterator of the parameters; the created iterator zips together an axis iterator over the columns of the weights and an iterator over the bias

Source

pub fn iter_mut(&mut self) -> ParamsIterMut<'_, A, D>
where D: RemoveAxis, S: DataMut,

returns a mutable iterator of the parameters, [IterMut], which essentially zips together a mutable axis iterator over the columns of the weights against a mutable iterator over the elements of the bias

Source

pub fn iter_bias(&self) -> Iter<'_, A, D::Smaller>
where S: Data,

returns an iterator over the bias

Source

pub fn iter_bias_mut(&mut self) -> IterMut<'_, A, D::Smaller>
where S: DataMut,

returns a mutable iterator over the bias

Source

pub fn iter_weights(&self) -> Iter<'_, A, D>
where S: Data,

returns an iterator over the weights

Source

pub fn iter_weights_mut(&mut self) -> IterMut<'_, A, D>
where S: DataMut,

returns a mutable iterator over the weights; see iter_mut for more

Source

pub fn axis_iter_weights(&self, axis: Axis) -> AxisIter<'_, A, D::Smaller>
where D: RemoveAxis, S: Data,

returns an iterator over the weights along the specified axis

Source

pub fn axis_iter_weights_mut( &mut self, axis: Axis, ) -> AxisIterMut<'_, A, D::Smaller>
where D: RemoveAxis, S: DataMut,

returns a mutable iterator over the weights along the specified axis

Source§

impl<S, D, A> ParamsBase<S, D, A>
where A: 'static + Clone, D: Dimension, S: Data<Elem = A>,

Source

pub fn cos(&self) -> Params<A, D>
where A: Float,

Source

pub fn cosh(&self) -> Params<A, D>
where A: Float,

Source

pub fn exp(&self) -> Params<A, D>
where A: Float,

Source

pub fn ln(&self) -> Params<A, D>
where A: Float,

Source

pub fn sin(&self) -> Params<A, D>
where A: Float,

Source

pub fn sinh(&self) -> Params<A, D>
where A: Float,

Source

pub fn sqrt(&self) -> Params<A, D>
where A: Float,

Source

pub fn tan(&self) -> Params<A, D>
where A: Float,

Source

pub fn tanh(&self) -> Params<A, D>
where A: Float,

Source

pub fn abs(&self) -> Params<A, D>
where A: Signed,

take the absolute value of each element within the parameters

Source§

impl<A, S, D> ParamsBase<S, D, A>
where A: Clone, D: Dimension, S: Data<Elem = A>,

Source

pub fn backward<X, Y>(&mut self, input: &X, grad: &Y, lr: A)
where Self: Backward<X, Y, Elem = A>,

execute a single backward propagation

Source

pub fn forward<X, Y>(&self, input: &X) -> Y
where Self: Forward<X, Output = Y>,

invoke a single forward step; this method is simply a convienience method implemented to reduce the number of Forward imports.

Source§

impl<A, S, D> ParamsBase<S, D, A>
where A: ScalarOperand + Float + FromPrimitive, D: Dimension, S: Data<Elem = A>,

Source

pub fn l1_norm(&self) -> A

computes the l1 normalization of the current weights and biases

Source

pub fn l2_norm(&self) -> A

Returns the L2 norm of the parameters (bias and weights).

Source§

impl<A, S> ParamsBase<S, Ix1>
where S: RawData<Elem = A>,

Source

pub fn from_scalar_bias(bias: A, weights: ArrayBase<S, Ix1>) -> Self
where A: Clone, S: DataOwned,

returns a new instance of the ParamsBase initialized using a scalar bias along with the given, one-dimensional weight tensor.

Source

pub fn nrows(&self) -> usize

returns the number of rows in the weights tensor

Source§

impl<A, S> ParamsBase<S, Ix2>
where S: RawData<Elem = A>,

Source

pub fn ncols(&self) -> usize

returns the number of columns in the weights tensor

Source

pub fn nrows(&self) -> usize

returns the number of rows in the weights tensor

Methods from Deref<Target = LayoutRef<S::Elem, D>>§

Source

pub fn len(&self) -> usize

Return the total number of elements in the array.

Source

pub fn len_of(&self, axis: Axis) -> usize

Return the length of axis.

The axis should be in the range Axis( 0 .. n ) where n is the number of dimensions (axes) of the array.

Panics if the axis is out of bounds.

Source

pub fn is_empty(&self) -> bool

Return whether the array has any elements

Source

pub fn ndim(&self) -> usize

Return the number of dimensions (axes) in the array

Source

pub fn dim(&self) -> <D as Dimension>::Pattern

Return the shape of the array in its “pattern” form, an integer in the one-dimensional case, tuple in the n-dimensional cases and so on.

Source

pub fn raw_dim(&self) -> D

Return the shape of the array as it’s stored in the array.

This is primarily useful for passing to other ArrayBase functions, such as when creating another array of the same shape and dimensionality.

use ndarray::Array;

let a = Array::from_elem((2, 3), 5.);

// Create an array of zeros that's the same shape and dimensionality as `a`.
let b = Array::<f64, _>::zeros(a.raw_dim());
Source

pub fn shape(&self) -> &[usize]

Return the shape of the array as a slice.

Note that you probably don’t want to use this to create an array of the same shape as another array because creating an array with e.g. Array::zeros() using a shape of type &[usize] results in a dynamic-dimensional array. If you want to create an array that has the same shape and dimensionality as another array, use .raw_dim() instead:

use ndarray::{Array, Array2};

let a = Array2::<i32>::zeros((3, 4));
let shape = a.shape();
assert_eq!(shape, &[3, 4]);

// Since `a.shape()` returned `&[usize]`, we get an `ArrayD` instance:
let b = Array::zeros(shape);
assert_eq!(a.clone().into_dyn(), b);

// To get the same dimension type, use `.raw_dim()` instead:
let c = Array::zeros(a.raw_dim());
assert_eq!(a, c);
Source

pub fn strides(&self) -> &[isize]

Return the strides of the array as a slice.

Source

pub fn stride_of(&self, axis: Axis) -> isize

Return the stride of axis.

The axis should be in the range Axis( 0 .. n ) where n is the number of dimensions (axes) of the array.

Panics if the axis is out of bounds.

Source

pub fn is_standard_layout(&self) -> bool

Return true if the array data is laid out in contiguous “C order” in memory (where the last index is the most rapidly varying).

Return false otherwise, i.e. the array is possibly not contiguous in memory, it has custom strides, etc.

Source

pub fn axes(&self) -> Axes<'_, D>

Return an iterator over the length and stride of each axis.

Source

pub fn max_stride_axis(&self) -> Axis

Return the axis with the greatest stride (by absolute value), preferring axes with len > 1.

Trait Implementations§

Source§

impl<A, B, S, D, F> Apply<F> for ParamsBase<S, D, A>
where A: Clone, D: Dimension, S: Data<Elem = A>, F: Fn(A) -> B,

Source§

type Output = ParamsBase<OwnedRepr<B>, D>

Source§

fn apply(&self, func: F) -> Self::Output

Source§

impl<A, S, D> Biased<S, D, A> for ParamsBase<S, D, A>
where S: RawData<Elem = A>, D: Dimension,

Source§

fn bias(&self) -> &ArrayBase<S, D::Smaller, A>

returns the bias of the model
Source§

fn bias_mut(&mut self) -> &mut ArrayBase<S, D::Smaller, A>

returns a mutable reference to the bias of the model
Source§

fn assign_bias(&mut self, bias: &ArrayBase<S, D::Smaller, A>) -> &mut Self
where S: DataMut, S::Elem: Clone,

assigns the given bias to the current bias
Source§

fn replace_bias( &mut self, bias: ArrayBase<S, D::Smaller, A>, ) -> ArrayBase<S, D::Smaller, A>

replaces the current bias with the given bias
Source§

fn set_bias(&mut self, bias: ArrayBase<S, D::Smaller, A>) -> &mut Self

sets the bias of the model
Source§

fn iter_bias<'a>(&'a self) -> Iter<'a, S::Elem, D::Smaller>
where S: Data + 'a, D: 'a,

returns an iterator over the bias
Source§

fn iter_bias_mut<'a>(&'a mut self) -> IterMut<'a, S::Elem, D::Smaller>
where S: DataMut + 'a, D: 'a,

returns a mutable iterator over the bias
Source§

impl<A, S, D> Clone for ParamsBase<S, D, A>
where D: Dimension, S: RawDataClone<Elem = A>, A: Clone,

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, S, D> Debug for ParamsBase<S, D, A>
where D: Dimension, S: Data<Elem = A>, A: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S, D> Deref for ParamsBase<S, D>
where D: Dimension, S: RawData,

Source§

type Target = LayoutRef<<S as RawData>::Elem, D>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<A, S, D> Display for ParamsBase<S, D, A>
where D: Dimension, S: Data<Elem = A>, A: Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S, D, A> ExactDimParams for ParamsBase<S, D, A>
where D: Dimension, S: RawData<Elem = A>,

Source§

type Shape = [usize]

Source§

fn shape(&self) -> &[usize]

returns a reference to the shape of the parameter
Source§

impl<A, S, D> FillLike<A> for ParamsBase<S, D, A>
where D: Dimension, S: DataOwned<Elem = A>, A: Clone,

Source§

type Output = ParamsBase<S, D, A>

Source§

fn fill_like(&self, elem: A) -> Self::Output

Source§

impl<A, X, Y, Z, S, D> Forward<X> for ParamsBase<S, D, A>
where A: Clone, D: Dimension, S: Data<Elem = A>, for<'a> ArrayView<'a, A, D>: Dot<X, Output = Y>, Y: for<'a> Add<&'a ArrayBase<S, D::Smaller, A>, Output = Z>,

Source§

type Output = Z

Source§

fn forward(&self, input: &X) -> Self::Output

a single forward step
Source§

fn forward_then<F>(&self, input: &Rhs, then: F) -> Self::Output
where F: FnOnce(Self::Output) -> Self::Output,

this method enables the forward pass to be generically activated using some closure. This is useful for isolating the logic of the forward pass from that of the activation function and is often used by layers and models.
Source§

impl<A, S, D> IntoIterator for ParamsBase<S, D, A>
where D: Dimension, S: RawData<Elem = A>,

Source§

type Item = ParamsBase<S, D, A>

The type of the elements being iterated over.
Source§

type IntoIter = Once<ParamsBase<S, D, A>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<A, B, S, D, F> MapInto<F, B> for &ParamsBase<S, D, A>
where A: Clone, D: Dimension, S: Data<Elem = A>, F: Fn(A) -> B,

Source§

type Elem = A

Source§

type Cont<T> = ParamsBase<OwnedRepr<T>, D, T>

Source§

fn mapi(self, func: F) -> Self::Cont<B>

Source§

impl<A, B, S, D, F> MapInto<F, B> for ParamsBase<S, D, A>
where A: Clone, D: Dimension, S: Data<Elem = A>, F: Fn(A) -> B,

Source§

type Elem = A

Source§

type Cont<T> = ParamsBase<OwnedRepr<T>, D, T>

Source§

fn mapi(self, func: F) -> Self::Cont<B>

Source§

impl<A, B, S, D, F> MapTo<F, B> for ParamsBase<S, D, A>
where A: Clone, D: Dimension, S: Data<Elem = A>, F: Fn(A) -> B,

Source§

type Cont<V> = ParamsBase<OwnedRepr<V>, D, V>

Source§

type Elem = A

Source§

fn mapt(&self, func: F) -> Self::Cont<B>

Source§

impl<A, S, D> OnesLike for ParamsBase<S, D, A>
where D: Dimension, S: DataOwned<Elem = A>, A: Clone + One,

Source§

type Output = ParamsBase<S, D, A>

Source§

fn ones_like(&self) -> Self::Output

Source§

impl<A, S, D> PartialEq<&ParamsBase<S, D, A>> for ParamsBase<S, D, A>
where D: Dimension, S: Data<Elem = A>, A: PartialEq,

Source§

fn eq(&self, other: &&ParamsBase<S, D, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, S, D> PartialEq<&mut ParamsBase<S, D, A>> for ParamsBase<S, D, A>
where D: Dimension, S: Data<Elem = A>, A: PartialEq,

Source§

fn eq(&self, other: &&mut ParamsBase<S, D, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, S, D> PartialEq for ParamsBase<S, D, A>
where D: Dimension, S: Data<Elem = A>, A: PartialEq,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S, D, A> RawParams for ParamsBase<S, D, A>
where D: Dimension, S: RawData<Elem = A>,

Source§

type Elem = A

Source§

impl<A, S, D> RawSpace for ParamsBase<S, D, A>
where D: Dimension, S: RawData<Elem = A>,

Source§

type Elem = A

The type of elements associated with the space
Source§

impl<S, D, A> TensorParams for ParamsBase<S, D, A>
where D: Dimension, S: RawData<Elem = A>,

Source§

fn rank(&self) -> usize

returns the number of dimensions of the parameter
Source§

fn size(&self) -> usize

returns the size of the parameter
Source§

impl<A, S, D> Weighted<S, D, A> for ParamsBase<S, D, A>
where S: RawData<Elem = A>, D: Dimension,

Source§

type Tensor<_S, _D, _A> = ArrayBase<_S, _D, _A> where _D: Dimension, _S: RawData<Elem = _A>

Source§

fn weights(&self) -> &ArrayBase<S, D, A>

returns the weights of the model
Source§

fn weights_mut(&mut self) -> &mut ArrayBase<S, D, A>

returns a mutable reference to the weights of the model
Source§

fn replace_weights( &mut self, weights: Self::Tensor<S, D, A>, ) -> Self::Tensor<S, D, A>

replaces the current weights with the given weights
Source§

fn set_weights(&mut self, weights: Self::Tensor<S, D, A>) -> &mut Self

sets the weights of the model
Source§

impl<A, S, D> ZerosLike for ParamsBase<S, D, A>
where D: Dimension, S: DataOwned<Elem = A>, A: Clone + Zero,

Source§

type Output = ParamsBase<S, D, A>

Source§

fn zeros_like(&self) -> Self::Output

Source§

impl<A, S, D> Copy for ParamsBase<S, D, A>
where D: Dimension + Copy, <D as Dimension>::Smaller: Copy, S: RawDataClone<Elem = A> + Copy, A: Copy,

Source§

impl<A, S, D> Eq for ParamsBase<S, D, A>
where D: Dimension, S: Data<Elem = A>, A: Eq,

Auto Trait Implementations§

§

impl<S, D, A> Freeze for ParamsBase<S, D, A>
where S: Freeze, <D as Dimension>::Smaller: Freeze, D: Freeze,

§

impl<S, D, A> RefUnwindSafe for ParamsBase<S, D, A>

§

impl<S, D, A> Send for ParamsBase<S, D, A>
where S: Send + Data,

§

impl<S, D, A> Sync for ParamsBase<S, D, A>
where S: Sync + Data,

§

impl<S, D, A> Unpin for ParamsBase<S, D, A>
where S: Unpin, <D as Dimension>::Smaller: Unpin, D: Unpin,

§

impl<S, D, A> UnwindSafe for ParamsBase<S, D, A>

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<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<S, T> Container<T> for S
where S: RawSpace<Elem = T>,

Source§

type Cont<V> = S

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<M, U, V> Predict<U> for M
where M: Forward<U, Output = V>,

Source§

type Output = V

Source§

fn __private__(&self) -> Seal

Source§

fn predict(&self, input: &U) -> <M as Predict<U>>::Output

Source§

impl<M, U, A, D> PredictWithConfidence<U> for M
where A: Float + FromPrimitive + ScalarOperand, D: Dimension, M: Predict<U, Output = ArrayBase<OwnedRepr<A>, D>>,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.