文件最后提交记录最后更新时间
25 天前
25 天前
25 天前
25 天前
25 天前
25 天前
4 个月前
1 个月前
README

SyncBNTrainingUpdate

产品支持情况

产品 是否支持
Ascend 950PR/Ascend 950DT
Atlas A3 训练系列产品/Atlas A3 推理系列产品
Atlas A2 训练系列产品/Atlas A2 推理系列产品
Atlas 200I/500 A2 推理产品 ×
Atlas 推理系列产品 ×
Atlas 训练系列产品

功能说明

  • 算子功能:SyncBNTrainingUpdate算子用于更新在BatchNormTraining过程中的全局的均值。

  • 计算公式:

runningmeanupdate=(mean∗momentum)+runningmean∗(1−momentum)running_mean_update = (mean * momentum) + running_mean * (1 - momentum)

参数说明

参数名 输入/输出/属性 描述 数据类型 数据格式
mean 输入 表示输入数据均值,对应公式中的`mean`。 FLOAT32、FLOAT16、BFLOAT16 ND
running_mean 输入 表示计算过程中的均值,对应公式中的`running_mean`。 FLOAT32、FLOAT16、BFLOAT16 ND
momentum 属性 runningMean的指数平滑参数,默认值0.1。 FLOAT32 -
running_mean_update 输出 更新后的均值,对应公式中的`running_mean_update`。 FLOAT32、FLOAT16、BFLOAT16 ND

约束说明

调用说明

调用方式 样例代码 说明
aclnn接口 test_aclnn_BatchNormGatherStatsWithCounts 通过aclnnBatchNormGatherStatsWithCounts接口方式调用SyncBNTrainingUpdate算子。
图模式 test_geir_sync_bn_training_update 通过算子IR构图方式调用SyncBNTrainingUpdate算子。