Struct tch::nn::SequentialT
source · pub struct SequentialT { /* private fields */ }
Expand description
A sequential layer combining new layers with support for a training mode.
Implementations§
source§impl SequentialT
impl SequentialT
source§impl SequentialT
impl SequentialT
sourcepub fn add<M: ModuleT + 'static>(self, layer: M) -> Self
pub fn add<M: ModuleT + 'static>(self, layer: M) -> Self
Appends a layer after all the current layers.
sourcepub fn add_fn<F>(self, f: F) -> Selfwhere
F: 'static + Fn(&Tensor) -> Tensor + Send,
pub fn add_fn<F>(self, f: F) -> Selfwhere F: 'static + Fn(&Tensor) -> Tensor + Send,
Appends a closure after all the current layers.
Trait Implementations§
source§impl Debug for SequentialT
impl Debug for SequentialT
Auto Trait Implementations§
impl !RefUnwindSafe for SequentialT
impl Send for SequentialT
impl !Sync for SequentialT
impl Unpin for SequentialT
impl !UnwindSafe for SequentialT
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