[−][src]Trait tch::nn::ModuleT
Module trait with an additional train parameter.
The train parameter is commonly used to have different behavior between training and evaluation, e.g. when using dropout or batch-normalization.
Required methods
Loading content...Provided methods
Loading content...Implementors
impl ModuleT for BatchNorm2D
[src]
fn forward_t(&self, xs: &Tensor, train: bool) -> Tensor
[src]
fn batch_accuracy_for_logits(
&self,
xs: &Tensor,
ys: &Tensor,
d: Device,
batch_size: i64
) -> f64
[src]
&self,
xs: &Tensor,
ys: &Tensor,
d: Device,
batch_size: i64
) -> f64
impl ModuleT for SequentialT
[src]
fn forward_t(&self, xs: &Tensor, train: bool) -> Tensor
[src]
fn batch_accuracy_for_logits(
&self,
xs: &Tensor,
ys: &Tensor,
d: Device,
batch_size: i64
) -> f64
[src]
&self,
xs: &Tensor,
ys: &Tensor,
d: Device,
batch_size: i64
) -> f64
impl<'a> ModuleT for FuncT<'a>
[src]
fn forward_t(&self, xs: &Tensor, train: bool) -> Tensor
[src]
fn batch_accuracy_for_logits(
&self,
xs: &Tensor,
ys: &Tensor,
d: Device,
batch_size: i64
) -> f64
[src]
&self,
xs: &Tensor,
ys: &Tensor,
d: Device,
batch_size: i64
) -> f64
impl<T> ModuleT for T where
T: Module,
[src]
T: Module,