提交 3e36e564 编写于 作者: L Luo Tao

add multiple outputs in annotation of paddle.infer

上级 be8e3b57
7 合并请求!11636[IMPORTANT] MKLDNN layout: Support for sum operator,!8482Release/0.11.0,!8190Release/0.11.0,!8189Release/0.11.0,!6633给线性回归的get-started代码加上了预测的示例~~,!4615Feature/tensor array add python binding,!2136add multiple outputs in annotation of paddle.infer
......@@ -97,8 +97,22 @@ def infer(output_layer, parameters, input, feeding=None, field='value'):
input=SomeData)
print result
If there are multiple outout_layers and fields, the examples usages:
.. code-block:: python
result = paddle.infer(output_layer=[prediction1, prediction2],
parameters=parameters,
input=SomeData,
field=[id, value]])
print result
The result order is prediction1.id, prediction2.id, prediction1.value,
prediction2.value.
:param output_layer: output of the neural network that would be inferred
:type output_layer: paddle.v2.config_base.Layer
:type output_layer: paddle.v2.config_base.Layer or a list of
paddle.v2.config_base.Layer
:param parameters: parameters of the neural network.
:type parameters: paddle.v2.parameters.Parameters
:param input: input data batch. Should be a python iterable object, and each
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部