ShallowParamsBase

Type Alias ShallowParamsBase 

Source
pub type ShallowParamsBase<S, D, A = f32> = ModelParamsBase<S, D, ParamsBase<S, D, A>, A>;
Expand description

a type alias for a shallow representation of the ModelParamsBase using a single ParamsBase instance as the hidden layer.

Aliased Type§

pub struct ShallowParamsBase<S, D, A = f32> { /* private fields */ }

Implementations§

Source§

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

Source

pub fn default(input: D, hidden: D, output: D) -> Self
where A: Clone + Default, S: DataOwned, D: RemoveAxis,

initialize a new instance of the ShallowParamsBase with the given input, hidden, and output dimensions using the default values for the parameters

Source

pub fn size(&self) -> usize

returns the total number parameters within the model, including the input and output layers

Source

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

returns an immutable reference to the hidden weights

Source

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

returns an mutable reference to the hidden weights

Source§

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

Source

pub fn from_features(features: ModelFeatures) -> Self
where A: Clone + Default, S: DataOwned,

Source

pub fn forward(&self, input: &Array1<A>) -> Array1<A>
where A: Float + ScalarOperand, S: Data,

forward input through the controller network

Trait Implementations§

Source§

impl<A, S> Default for ShallowParamsBase<S, Ix2, A>
where S: DataOwned<Elem = A>, A: Clone + Default,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more