From bc02d1aa96acce39522dc45b25bab84d420ed27a Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Mon, 15 May 2017 14:11:48 +0800 Subject: [PATCH] follow comments --- python/paddle/v2/inference.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/python/paddle/v2/inference.py b/python/paddle/v2/inference.py index 2c1ae08f46..139339902e 100644 --- a/python/paddle/v2/inference.py +++ b/python/paddle/v2/inference.py @@ -88,7 +88,7 @@ def infer(output_layer, parameters, input, feeding=None, field='value'): Infer a neural network by given neural network output and parameters. The user should pass either a batch of input data or reader method. - Example usages: + Example usage for sinlge output_layer: .. code-block:: python @@ -97,7 +97,7 @@ 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: + Example usage for multiple outout_layers and fields: .. code-block:: python @@ -107,9 +107,6 @@ def infer(output_layer, parameters, input, feeding=None, field='value'): 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 or a list of paddle.v2.config_base.Layer @@ -126,7 +123,9 @@ def infer(output_layer, parameters, input, feeding=None, field='value'): Note that `prob` only used when output_layer is beam_search or max_id. :type field: str - :return: a numpy array + :return: The prediction result. If there are multiple outout_layers and fields, + the return order is outout_layer1.field1, outout_layer2.field1, ..., + outout_layer1.field2, outout_layer2.field2 ... :rtype: numpy.ndarray """ -- GitLab