diff --git a/develop/doc/_sources/api/v2/run_logic.rst.txt b/develop/doc/_sources/api/v2/run_logic.rst.txt index 904d45966dfc16a474016ff48fd5a951988b0ab0..0f807873ff9a16263920fa73bf70316df3336d0b 100644 --- a/develop/doc/_sources/api/v2/run_logic.rst.txt +++ b/develop/doc/_sources/api/v2/run_logic.rst.txt @@ -2,6 +2,7 @@ Trainer API ########### + ========== Parameters ========== @@ -24,3 +25,10 @@ Event .. automodule:: paddle.v2.event :members: + + +========= +Inference +========= + +.. autofunction:: paddle.v2.infer \ No newline at end of file diff --git a/develop/doc/api/v2/run_logic.html b/develop/doc/api/v2/run_logic.html index 240266f1be81f84fa38f196d5faccb1d9c569954..07784807d1e7ecf2ebeafce19b8c46fe9d2a0edd 100644 --- a/develop/doc/api/v2/run_logic.html +++ b/develop/doc/api/v2/run_logic.html @@ -171,6 +171,7 @@
  • Parameters
  • Trainer
  • Event
  • +
  • Inference
  • @@ -496,6 +497,51 @@ index that reader returns.

    Event On One Batch Training Complete.

    + +
    +

    Inference

    +
    +
    +paddle.v2.infer(output, parameters, input=None, batch_size=None, reader=None, 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:

    +
    result = paddle.infer(prediction, parameters, input=SomeData,
    +                      batch_size=32)
    +print result
    +
    +
    + +++ + + + + + + + +
    Parameters:
      +
    • output (paddle.v2.config_base.Layer) – output of the neural network that would be inferred
    • +
    • parameters (paddle.v2.parameters.Parameters) – parameters of the neural network.
    • +
    • input (collections.Iterable) – input data batch. Should be a python iterable object, and each +element is the data batch.
    • +
    • batch_size (int) – the batch size when perform inference. Default is the +length of input.
    • +
    • reader (callable) – input data reader creator in batch. If this field is set, the +input and batch_size will be ignored.
    • +
    • feeding – Reader dictionary. Default could generate from input +value.
    • +
    • field (str) – The prediction field. It should in [value, ids]. value +means return the prediction probabilities, ids means return +the prediction labels. Default is value
    • +
    +
    Returns:

    a numpy array

    +
    Return type:

    numpy.ndarray

    +
    +
    +
    diff --git a/develop/doc/genindex.html b/develop/doc/genindex.html index 2c151ec5d760473e6ad44e16f83d0bd5a9287dd1..13a54c2851ca8726617eab859d12f1e9ab30c7c9 100644 --- a/develop/doc/genindex.html +++ b/develop/doc/genindex.html @@ -437,11 +437,13 @@
  • img_conv_bn_pool (class in paddle.v2.networks)
  • - - + @@ -503,6 +504,51 @@ index that reader returns.

    Event On One Batch Training Complete.

    + +
    +

    Inference

    +
    +
    +paddle.v2.infer(output, parameters, input=None, batch_size=None, reader=None, 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:

    +
    result = paddle.infer(prediction, parameters, input=SomeData,
    +                      batch_size=32)
    +print result
    +
    +
    + +++ + + + + + + + +
    参数:
      +
    • output (paddle.v2.config_base.Layer) – output of the neural network that would be inferred
    • +
    • parameters (paddle.v2.parameters.Parameters) – parameters of the neural network.
    • +
    • input (collections.Iterable) – input data batch. Should be a python iterable object, and each +element is the data batch.
    • +
    • batch_size (int) – the batch size when perform inference. Default is the +length of input.
    • +
    • reader (callable) – input data reader creator in batch. If this field is set, the +input and batch_size will be ignored.
    • +
    • feeding – Reader dictionary. Default could generate from input +value.
    • +
    • field (str) – The prediction field. It should in [value, ids]. value +means return the prediction probabilities, ids means return +the prediction labels. Default is value
    • +
    +
    返回:

    a numpy array

    +
    返回类型:

    numpy.ndarray

    +
    +
    +
    diff --git a/develop/doc_cn/genindex.html b/develop/doc_cn/genindex.html index 5583e80e4b991c0bbd0ddb39c894dc354bf20713..b4307250c16330879151ee4cb982d97d15908195 100644 --- a/develop/doc_cn/genindex.html +++ b/develop/doc_cn/genindex.html @@ -444,11 +444,13 @@
  • img_conv_bn_pool (paddle.v2.networks 中的类)
  • - - +