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

Clarify the use of _cop_num_*.

上级 e812c43a
...@@ -897,7 +897,9 @@ If you pass a function name to the ``__init__()`` method of the ...@@ -897,7 +897,9 @@ If you pass a function name to the ``__init__()`` method of the
by setting the `_cop_num_inputs` and `_cop_num_outputs` by setting the `_cop_num_inputs` and `_cop_num_outputs`
attributes on your op. The main function will always be attributes on your op. The main function will always be
called with that number of arguments, using NULL to fill in called with that number of arguments, using NULL to fill in
for missing values at the end. for missing values at the end. This can be used if your op
has a variable number of inputs or outputs, but with a fixed
maximum.
For example, the main C function of an op that takes two TensorTypes For example, the main C function of an op that takes two TensorTypes
(which has ``PyArrayObject *`` as its C type) as inputs and returns (which has ``PyArrayObject *`` as its C type) as inputs and returns
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论