| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 27 天前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 27 天前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 27 天前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 27 天前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 27 天前 | |
[CANNBOT]bnll, celu, relu6, apply_adadelta, apply_adamax, apply_proximal_gradient_descent, apply_rms_prop适配Ascend950 Ascendc实现 Co-authored-by: gcw_YBIAEfqJ<wangweidong15@huawei.com> # message auto-generated for no-merge-commit merge: !5303 merge 0525 into master [CANNBOT]bnll, celu, relu6, apply_adadelta, apply_adamax, apply_proximal_gradient_descent, apply_rms_prop适配Ascend950 Ascendc实现 Created-by: gcw_YBIAEfqJ Commit-by: gcw_YBIAEfqJ Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ┌──────────────────────────────┬────────┬─────────────────────────────────────────────────────────┐ │ 算子 │ 类型 │ 关键公式 │ ├──────────────────────────────┼────────┼─────────────────────────────────────────────────────────┤ │ BNLL │ 激活 │ $\ln(1+e^x)$ │ ├──────────────────────────────┼────────┼─────────────────────────────────────────────────────────┤ │ Celu │ 激活 │ 正区常数 $3\alpha_3$,负区 $\alpha_1(e^{x/\alpha_2}-1)$ │ ├──────────────────────────────┼────────┼─────────────────────────────────────────────────────────┤ │ Relu6 │ 激活 │ $\min(\max(x,0),6)$ │ ├──────────────────────────────┼────────┼─────────────────────────────────────────────────────────┤ │ ApplyAdadelta │ 优化器 │ 自适应学习率,$\sqrt{accum_update}/\sqrt{accum}$ 缩放 │ ├──────────────────────────────┼────────┼─────────────────────────────────────────────────────────┤ │ ApplyAdaMax │ 优化器 │ Adam 变体,$L_\infty$ 替代二阶矩 │ ├──────────────────────────────┼────────┼─────────────────────────────────────────────────────────┤ │ ApplyProximalGradientDescent │ 优化器 │ SGD + L1/L2 近端算子 │ ├──────────────────────────────┼────────┼─────────────────────────────────────────────────────────┤ │ ApplyRMSProp │ 优化器 │ 梯度平方滑动平均 + 动量 │ └──────────────────────────────┴────────┴─────────────────────────────────────────────────────────┘ ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/2884 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> OBP冒烟: 二级冒烟: ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!5303 | 2 个月前 | |
Label the chip Co-authored-by: zhouwenfang<zhouwenfang3@h-partners.com> # message auto-generated for no-merge-commit merge: !7823 merge master into master Label the chip Created-by: zhouwenfang Commit-by: zhouwenfang Merged-by: cann-robot Description: ## 描述 Label the chip ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/4245 ## 测试 NA ## 文档更新 activation目录所有的aclnn.md文件 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!7823 | 10 天前 |
BNLL
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Ascend 950PR/Ascend 950DT | √ |
| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | × |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
功能说明
- 算子功能:激活函数BNLL(Binomial Normal Log Likelihood),即数值稳定版本的softplus。
- 计算公式:
BNLL(x)=ln(1+ex)BNLL(x) = \ln(1 + e^x) BNLL(x)=ln(1+ex)
等价分段实现(保证数值稳定性):
yi={xi+ln(1+e−xi)if xi>0ln(1+exi)otherwisey_i = \begin{cases} x_i + \ln(1 + e^{-x_i}) & \text{if } x_i > 0 \\ \ln(1 + e^{x_i}) & \text{otherwise} \end{cases} yi={xi+ln(1+e−xi)ln(1+exi)if xi>0otherwise
参数说明
| 参数名 | 输入/输出 | 描述 | 数据类型 | 数据格式 |
|---|---|---|---|---|
| x | 输入 | 公式中的'x',表示BNLL激活函数的输入张量。支持空Tensor,维度支持0-8。 | FLOAT16、FLOAT32 | ND |
| y | 输出 | 表示x经BNLL计算得到的输出张量,shape和dtype与输入x一致。 | FLOAT16、FLOAT32 | ND |
约束说明
无
调用说明
| 调用方式 | 样例代码 | 说明 |
|---|---|---|
| GE图模式 | test_geir_bnll.cpp | 通过GE IR接口方式调用BNLL算子。 |