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
sourceimpl SequentialT
impl SequentialT
sourceimpl 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) -> Self where
F: 'static + Fn(&Tensor) -> Tensor + Send,
pub fn add_fn<F>(self, f: F) -> Self where
F: 'static + Fn(&Tensor) -> Tensor + Send,
Appends a closure after all the current layers.
Trait Implementations
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more