| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 17 天前 | ||
| 6 个月前 | ||
| 17 天前 | ||
| 17 天前 | ||
| 1 天前 | ||
| 5 个月前 | ||
| 3 个月前 |
AdamApplyOneWithDecay
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Ascend 950PR/Ascend 950DT | √ |
| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | × |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
功能说明
-
算子功能:对模型中的一个参数(如权重),完成Adam优化算法的单步计算和更新。
-
计算公式:
output0=input02×mul3_x+input1×mul2_xoutput_0 = input_0^2 \times mul_3\_x + input_1 \times mul_2\_x
output1=input2×mul0_x+input0×mul1_xoutput_1 = input_2 \times mul_0\_x + input_0 \times mul_1\_x
output2=input3−((output1(output0)+add2_y)+input3×mul4_x)×input4output_2 = input_3 - ((\frac{output_1}{\sqrt(output_0) + add_2\_y}) + input_3 \times mul_4\_x) \times input_4
参数说明
| 参数名 | 输入/输出/属性 | 描述 | 数据类型 | 数据格式 |
|---|---|---|---|---|
| input0 | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的input0。 | BFLOAT16、FLOAT16、FLOAT | ND |
| input1 | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的input1。 | BFLOAT16、FLOAT16、FLOAT | ND |
| input2 | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的input2。 | BFLOAT16、FLOAT16、FLOAT | ND |
| input3 | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的input3。 | BFLOAT16、FLOAT16、FLOAT | ND |
| input4 | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的input4。 | BFLOAT16、FLOAT16、FLOAT | ND |
| mul0_x | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的mul0_x。 | BFLOAT16、FLOAT16、FLOAT | ND |
| mul1_x | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的mul1_x。 | BFLOAT16、FLOAT16、FLOAT | ND |
| mul2_x | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的mul2_x。 | BFLOAT16、FLOAT16、FLOAT | ND |
| mul3_x | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的mul3_x。 | BFLOAT16、FLOAT16、FLOAT | ND |
| mul4_x | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的mul4_x。 | BFLOAT16、FLOAT16、FLOAT | ND |
| add2_y | 输入 | 待进行adam_apply_one_with_decay计算的入参,公式中的add2_y。 | BFLOAT16、FLOAT16、FLOAT | ND |
| output0 | 输出 | 待进行adam_apply_one_with_decay计算的出参,公式中的output0。 | BFLOAT16、FLOAT16、FLOAT | ND |
| output1 | 输出 | 待进行adam_apply_one_with_decay计算的出参,公式中的output1。 | BFLOAT16、FLOAT16、FLOAT | ND |
| output2 | 输出 | 待进行adam_apply_one_with_decay计算的出参,公式中的output2。 | BFLOAT16、FLOAT16、FLOAT | ND |
约束说明
无
调用说明
| 调用方式 | 调用样例 | 说明 |
|---|---|---|
| 图模式调用 | test_geir_adam_apply_one_with_decay | 通过算子IR构图方式调用AdamApplyOne算子。 |