LazyInstanceNorm2d ¬
- class torch.nn.LazyInstanceNorm2d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None)[source][source] ¬
一个具有懒加载
num_features
参数的torch.nn.InstanceNorm2d
模块。The
num_features
argument of theInstanceNorm2d
is inferred from theinput.size(1)
. The attributes that will be lazily initialized are weight, bias, running_mean and running_var.检查
torch.nn.modules.lazy.LazyModuleMixin
以获取关于懒加载模块及其限制的进一步文档。- 参数:
num_features – 来自预期大小为 或
eps (float) – 为数值稳定性添加到分母的值。默认:1e-5
momentum(可选[float])- 用于计算 running_mean 和 running_var 的值。默认:0.1
affine(bool)- 一个布尔值,当设置为
True
时,此模块具有可学习的仿射参数,初始化方式与批量归一化相同。默认:False
。track_running_stats(bool)- 一个布尔值,当设置为
True
时,此模块跟踪运行均值和方差,当设置为False
时,此模块不跟踪此类统计信息,在训练和评估模式下始终使用批处理统计信息。默认:False
- 形状:
输入: 或
输出: 或 (与输入相同形状)