Shortcuts

Template Class NormImplBase

Inheritance Relationships

Base Type

Class Documentation

template<size_t D, typename Derived, typename DerivedOptions>
class torch::nn::NormImplBase : public torch::nn::Cloneable<Derived>

Base class for all (dimension-specialized) batchnorm and instancenorm modules.

Public Functions

NormImplBase(const DerivedOptions &options_)
void reset() override

reset() must perform initialization of all members with reference semantics, most importantly parameters, buffers and submodules.

void reset_running_stats()
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 was true upon construction.

Tensor bias

The learned bias.

Only defined if the affine option was true upon construction.

Tensor running_mean

The running mean.

Only defined if the track_running_stats option was true upon construction.

Tensor running_var

The running variance.

Only defined if the track_running_stats option was true upon construction.

Tensor num_batches_tracked

The number of the forward call.

Only defined if the track_running_stats option was true upon construction.

Protected Functions

void _check_input_dim(const Tensor &input) = 0

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources