Trait candle_core::Module
source · pub trait Module: Debug {
// Required method
fn forward(&self, xs: &Tensor) -> Result<Tensor>;
// Provided method
fn set_training(&mut self, _training: bool) { ... }
}Required Methods§
Provided Methods§
sourcefn set_training(&mut self, _training: bool)
fn set_training(&mut self, _training: bool)
Change the module to use training mode vs eval mode.
The default implementation does nothing as this is only used for a couple modules such as dropout or batch-normalization.