Skip to content

Commit

Permalink
add compare_accuracy (PaddlePaddle#5874)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangkaihuo authored and lijialin03 committed May 16, 2023
1 parent b85155b commit 2b42f75
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/api/paddle/amp/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Debug 相关辅助类
.. csv-table::
:header: "API 名称", "API 功能"
:widths: 10, 30

" :ref:`enable_tensor_checker <cn_api_amp_debugging_enable_tensor_checker>` ", "开启模块级别的精度检查"
" :ref:`disable_tensor_checker <cn_api_amp_debugging_disable_tensor_checker>` ", "关闭模块级别的精度检查"
" :ref:`compare_accuracy <cn_api_amp_debugging_compare_accuracy>` ", "精度比对接口"
25 changes: 25 additions & 0 deletions docs/api/paddle/amp/debugging/compare_accuracy_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. _cn_api_amp_debugging_compare_accuracy:

compare_accuracy
-------------------------------
.. py:function:: paddle.amp.debugging.compare_accuracy(dump_path, another_dump_path, output_filename, loss_scale=1, dump_all_tensors=False)
`compare_accuracy` 是一个精度比对的工具,可以用来比较 float16 和 float32 的 log 数据。

参数
:::::::::
- **dump_path** (str): 运行日志的路径,比如数据类型是 float32 的训练日志。
- **another_dump_path** (str): 另一份运行日志的路径,比如数据类型是 float16 的训练日志。
- **output_filename** (str): 输出 excel 的文件名,用于保存两份日志的比对结果。
- **loss_scale** (float, 可选): 训练阶段的 loss_scale,默认是 1。
- **dump_all_tensors** (bool, 可选): True 表示 dump 所有的 tensor 数据,False 表示不做处理,当前还不支持这个参数,默认是 False。


返回值
:::::::::

代码示例
:::::::::

COPY-FROM: paddle.amp.debugging.compare_accuracy

0 comments on commit 2b42f75

Please sign in to comment.