pub struct LayerSequence<M: LayerParallelism> {
pub input: M::InputLayer,
pub hidden: Vec<M::HiddenLayer>,
pub output: M::OutputLayer,
}Expand description
The layers of a LayerParallelism model, owned.
Fields§
§input: M::InputLayerThe input layer.
The hidden layers, in forward order.
output: M::OutputLayerThe output layer.
Trait Implementations§
Source§impl<M: Debug + LayerParallelism> Debug for LayerSequence<M>
impl<M: Debug + LayerParallelism> Debug for LayerSequence<M>
Auto Trait Implementations§
impl<M> Freeze for LayerSequence<M>where
<M as LayerParallelism>::InputLayer: Freeze,
Vec<<M as LayerParallelism>::HiddenLayer>: Freeze,
<M as LayerParallelism>::OutputLayer: Freeze,
impl<M> RefUnwindSafe for LayerSequence<M>where
<M as LayerParallelism>::InputLayer: RefUnwindSafe,
Vec<<M as LayerParallelism>::HiddenLayer>: RefUnwindSafe,
<M as LayerParallelism>::OutputLayer: RefUnwindSafe,
impl<M> Send for LayerSequence<M>where
<M as LayerParallelism>::InputLayer: Send,
Vec<<M as LayerParallelism>::HiddenLayer>: Send,
<M as LayerParallelism>::OutputLayer: Send,
impl<M> Sync for LayerSequence<M>where
<M as LayerParallelism>::InputLayer: Sync,
Vec<<M as LayerParallelism>::HiddenLayer>: Sync,
<M as LayerParallelism>::OutputLayer: Sync,
impl<M> Unpin for LayerSequence<M>where
<M as LayerParallelism>::InputLayer: Unpin,
Vec<<M as LayerParallelism>::HiddenLayer>: Unpin,
<M as LayerParallelism>::OutputLayer: Unpin,
impl<M> UnsafeUnpin for LayerSequence<M>where
<M as LayerParallelism>::InputLayer: UnsafeUnpin,
Vec<<M as LayerParallelism>::HiddenLayer>: UnsafeUnpin,
<M as LayerParallelism>::OutputLayer: UnsafeUnpin,
impl<M> UnwindSafe for LayerSequence<M>where
<M as LayerParallelism>::InputLayer: UnwindSafe,
Vec<<M as LayerParallelism>::HiddenLayer>: UnwindSafe,
<M as LayerParallelism>::OutputLayer: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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 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> ⓘ
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