LazyBatchNorm1d — PyTorch 2.7 documentation (original) (raw)

class torch.nn.LazyBatchNorm1d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None)[source][source]

A torch.nn.BatchNorm1d module with lazy initialization.

Lazy initialization based on the num_features argument of the BatchNorm1d that is inferred from the input.size(1). The attributes that will be lazily initialized are weight, bias,running_mean and running_var.

Check the torch.nn.modules.lazy.LazyModuleMixin for further documentation on lazy modules and their limitations.

Parameters

cls_to_become[source]

alias of BatchNorm1d