提交 adb4f3b7 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Document debug_perform().

上级 f2e3c8d7
......@@ -266,6 +266,20 @@ Optional methods or attributes
As done in the Alloc op, you can return False only in some cases by
analyzing the graph from the node parameter.
.. function:: debug_perform(node, inputs, output_storage)
Undefined by default.
If you define this function then it will be used instead of C code
or perform() to do the computation while debugging (currently
DebugMode, but others amy also use it in the future). It has the
same signature and contract as :func:`perform`.
This enables ops that don't have a deterministic output for
efficiency reasons to make their output determinisitic or do fix
problems that they encounter with DebugMode. If your op doesn't
have any problems, don't implement this.
If you want your op to work with gradient.grad() you also need to
implement the functions described below.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论