Template Class NormImplBase#
Defined in File batchnorm.h
Page Contents
Inheritance Relationships#
Base Type#
public torch::nn::Cloneable< Derived >
(Template Class Cloneable)
Derived Types#
public torch::nn::BatchNormImplBase< 1, BatchNorm1dImpl >
(Template Class BatchNormImplBase)public torch::nn::BatchNormImplBase< 3, BatchNorm3dImpl >
(Template Class BatchNormImplBase)public torch::nn::BatchNormImplBase< 2, BatchNorm2dImpl >
(Template Class BatchNormImplBase)public torch::nn::InstanceNormImpl< 1, InstanceNorm1dImpl >
(Template Class InstanceNormImpl)public torch::nn::InstanceNormImpl< 2, InstanceNorm2dImpl >
(Template Class InstanceNormImpl)public torch::nn::InstanceNormImpl< 3, InstanceNorm3dImpl >
(Template Class InstanceNormImpl)
Class Documentation#
-
template<size_t D, typename Derived, typename DerivedOptions>
class NormImplBase : public torch::nn::Cloneable<Derived># Base class for all (dimension-specialized) batchnorm and instancenorm modules.
Subclassed by torch::nn::BatchNormImplBase< 1, BatchNorm1dImpl >, torch::nn::BatchNormImplBase< 3, BatchNorm3dImpl >, torch::nn::BatchNormImplBase< 2, BatchNorm2dImpl >, torch::nn::InstanceNormImpl< 1, InstanceNorm1dImpl >, torch::nn::InstanceNormImpl< 2, InstanceNorm2dImpl >, torch::nn::InstanceNormImpl< 3, InstanceNorm3dImpl >
Public Functions
-
inline NormImplBase(const DerivedOptions &options_)#
-
inline virtual void reset() override#
reset()
must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules.
-
inline void reset_running_stats()#
-
inline void reset_parameters()#
Public Members
-
DerivedOptions options#
The options with which this module was constructed.
-
Tensor weight#
The learned weight.
Only defined if the
affine
option wastrue
upon construction.
-
Tensor bias#
The learned bias.
Only defined if the
affine
option wastrue
upon construction.
-
Tensor running_mean#
The running mean.
Only defined if the
track_running_stats
option wastrue
upon construction.
-
Tensor running_var#
The running variance.
Only defined if the
track_running_stats
option wastrue
upon construction.
-
Tensor num_batches_tracked#
The number of the forward call.
Only defined if the
track_running_stats
option wastrue
upon construction.
Protected Functions
-
virtual void _check_input_dim(const Tensor &input) = 0#
-
inline NormImplBase(const DerivedOptions &options_)#