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.