pub struct NeuralFeatures { /* private fields */ }Implementations§
Source§impl NeuralFeatures
impl NeuralFeatures
pub fn new( attention: usize, memory: usize, inputs: usize, outputs: usize, hidden: usize, layers: usize, ) -> NeuralFeatures
Sourcepub const fn codex(&self) -> usize
pub const fn codex(&self) -> usize
returns a copy of the number of features within the read/write heads
returns a copy of the hidden size
Sourcepub const fn dim_attention(&self) -> (usize, usize)
pub const fn dim_attention(&self) -> (usize, usize)
the shape of the attention layer (n_outputs, n_attention)
Sourcepub const fn dim_input(&self) -> (usize, usize)
pub const fn dim_input(&self) -> (usize, usize)
the shape of the input layer (inputs, n_hidden)
the shape of the hidden layer (hidden, hidden)
Sourcepub const fn dim_memory(&self) -> (usize, usize)
pub const fn dim_memory(&self) -> (usize, usize)
the shape of the memory matrix (n_memory, n_attention)
Sourcepub const fn dim_output(&self) -> (usize, usize)
pub const fn dim_output(&self) -> (usize, usize)
the shape of the output layer (n_hidden, n_out)
Sourcepub fn set_attention(&mut self, attention: usize)
pub fn set_attention(&mut self, attention: usize)
set the number of features for attention
Sourcepub fn set_inputs(&mut self, inputs: usize)
pub fn set_inputs(&mut self, inputs: usize)
set the number of features for then input layer
set the number of features for the hidden layer
Sourcepub fn set_outputs(&mut self, outputs: usize)
pub fn set_outputs(&mut self, outputs: usize)
set the number of features for the output layer
Sourcepub fn with_attention(self, attention: usize) -> NeuralFeatures
pub fn with_attention(self, attention: usize) -> NeuralFeatures
consumes the current instance; returns another with the given number of features for attention
Sourcepub fn with_codex(self, codex: usize) -> NeuralFeatures
pub fn with_codex(self, codex: usize) -> NeuralFeatures
consumes the current instance; returns another with the given number of features for the read/write heads
Sourcepub fn with_inputs(self, inputs: usize) -> NeuralFeatures
pub fn with_inputs(self, inputs: usize) -> NeuralFeatures
consumes the current instance; returns another with the given number of input features
consumes the current instance; returns another with the given number of hidden features
Sourcepub fn with_outputs(self, outputs: usize) -> NeuralFeatures
pub fn with_outputs(self, outputs: usize) -> NeuralFeatures
consumes the current instance; returns another with the given number of output features
Trait Implementations§
Source§impl Clone for NeuralFeatures
impl Clone for NeuralFeatures
Source§fn clone(&self) -> NeuralFeatures
fn clone(&self) -> NeuralFeatures
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NeuralFeatures
impl Debug for NeuralFeatures
Source§impl Default for NeuralFeatures
impl Default for NeuralFeatures
Source§fn default() -> NeuralFeatures
fn default() -> NeuralFeatures
Source§impl<'de> Deserialize<'de> for NeuralFeatures
impl<'de> Deserialize<'de> for NeuralFeatures
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NeuralFeatures, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NeuralFeatures, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for NeuralFeatures
impl Hash for NeuralFeatures
Source§impl Ord for NeuralFeatures
impl Ord for NeuralFeatures
Source§fn cmp(&self, other: &NeuralFeatures) -> Ordering
fn cmp(&self, other: &NeuralFeatures) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NeuralFeatures
impl PartialEq for NeuralFeatures
Source§impl PartialOrd for NeuralFeatures
impl PartialOrd for NeuralFeatures
Source§impl Serialize for NeuralFeatures
impl Serialize for NeuralFeatures
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for NeuralFeatures
impl Eq for NeuralFeatures
impl StructuralPartialEq for NeuralFeatures
Auto Trait Implementations§
impl Freeze for NeuralFeatures
impl RefUnwindSafe for NeuralFeatures
impl Send for NeuralFeatures
impl Sync for NeuralFeatures
impl Unpin for NeuralFeatures
impl UnwindSafe for NeuralFeatures
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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