pub struct ModelLayout<F, D = Deep>where
D: NetworkDepth,
F: RawModelLayout,{ /* private fields */ }Expand description
In contrast to the ModelFeatures type, the ModelLayout implementation aims to
provide a generic foundation for using type-based features / layouts within neural network.
Our goal with this struct is to eventually push the implementation to the point of being
able to sufficiently describe everything about a model’s layout (similar to what the
ndarray developers have attained with the LayoutRef).
Implementations§
Source§impl<F, D> ModelLayout<F, D>where
F: RawModelLayout,
D: NetworkDepth,
impl<F, D> ModelLayout<F, D>where
F: RawModelLayout,
D: NetworkDepth,
Sourcepub const fn new(features: F) -> Self
pub const fn new(features: F) -> Self
creates a new instance of ModelLayout using the given features
Sourcepub const fn features_mut(&mut self) -> &mut F
pub const fn features_mut(&mut self) -> &mut F
returns a mutable reference to the features of the model layout
returns a reference to the hidden features of the model layout
Source§impl<F> ModelLayout<F, Deep>where
F: RawModelLayout,
impl<F> ModelLayout<F, Deep>where
F: RawModelLayout,
Sourcepub const fn deep(features: F) -> Self
pub const fn deep(features: F) -> Self
creates a new instance of ModelLayout using the given features
Source§impl<F> ModelLayout<F, Shallow>where
F: RawModelLayout,
impl<F> ModelLayout<F, Shallow>where
F: RawModelLayout,
Trait Implementations§
Source§impl<F, D> Clone for ModelLayout<F, D>
impl<F, D> Clone for ModelLayout<F, D>
Source§fn clone(&self) -> ModelLayout<F, D>
fn clone(&self) -> ModelLayout<F, D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F, D> Debug for ModelLayout<F, D>
impl<F, D> Debug for ModelLayout<F, D>
Source§impl<F, D> Deref for ModelLayout<F, D>where
F: RawModelLayout,
D: NetworkDepth,
impl<F, D> Deref for ModelLayout<F, D>where
F: RawModelLayout,
D: NetworkDepth,
Source§impl<F, D> DerefMut for ModelLayout<F, D>where
F: RawModelLayout,
D: NetworkDepth,
impl<F, D> DerefMut for ModelLayout<F, D>where
F: RawModelLayout,
D: NetworkDepth,
Source§impl<F, D> Hash for ModelLayout<F, D>
impl<F, D> Hash for ModelLayout<F, D>
Source§impl<F, D> Ord for ModelLayout<F, D>
impl<F, D> Ord for ModelLayout<F, D>
Source§fn cmp(&self, other: &ModelLayout<F, D>) -> Ordering
fn cmp(&self, other: &ModelLayout<F, D>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<F, D> PartialEq for ModelLayout<F, D>
impl<F, D> PartialEq for ModelLayout<F, D>
Source§impl<F, D> PartialOrd for ModelLayout<F, D>
impl<F, D> PartialOrd for ModelLayout<F, D>
impl<F, D> Copy for ModelLayout<F, D>
impl<F, D> Eq for ModelLayout<F, D>
impl<F, D> StructuralPartialEq for ModelLayout<F, D>where
D: NetworkDepth,
F: RawModelLayout,
Auto Trait Implementations§
impl<F, D> Freeze for ModelLayout<F, D>where
F: Freeze,
impl<F, D> RefUnwindSafe for ModelLayout<F, D>where
F: RefUnwindSafe,
D: RefUnwindSafe,
impl<F, D> Send for ModelLayout<F, D>
impl<F, D> Sync for ModelLayout<F, D>
impl<F, D> Unpin for ModelLayout<F, D>
impl<F, D> UnwindSafe for ModelLayout<F, D>where
F: UnwindSafe,
D: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.