鲲鹏社区首页
中文
注册
开发者
我要评分
获取效率
正确性
完整性
易理解
在线提单
论坛求助

GroupNorm

接口功能

沿通道维度分组归一化(独立于batch大小)。

函数原型

torch.nn.GroupNorm(
    num_groups: int,
    num_channels: int,
    eps: float = 1e-5,
    affine: bool = True,
    device=None,
    dtype=None
)

参数说明

表1 参数说明

参数

类型

必填

说明

num_groups

int

分组数量(需被num_channels整除)。

num_channels

int

输入通道总数。

eps

float

数值稳定性常数(默认1e-5)。

affine

bool

是否学习缩放因子γ和偏移β(默认True)。