From 5b8837897d7dedfb27425bf63922d913a7369eb2 Mon Sep 17 00:00:00 2001 From: Liufang Sang Date: Fri, 3 Jan 2020 15:44:21 +0800 Subject: [PATCH] add shape description in accuracy api doc (#22011) * add shape description in accuracy api doc test=develop * fix details test=develop * fix details test=develop --- python/paddle/fluid/layers/metric_op.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/metric_op.py b/python/paddle/fluid/layers/metric_op.py index e19a8226ac..60cfb816bc 100644 --- a/python/paddle/fluid/layers/metric_op.py +++ b/python/paddle/fluid/layers/metric_op.py @@ -40,7 +40,8 @@ def accuracy(input, label, k=1, correct=None, total=None): Args: input(Variable): The input of accuracy layer, which is the predictions of network. A LoDTensor or Tensor with type float32,float64. - label(Variable): The label of dataset. LoDTensor or Tensor with type int32,int64. + The shape is ``[sample_number, class_dim]`` . + label(Variable): The label of dataset. LoDTensor or Tensor with type int32,int64. The shape is ``[sample_number, 1]`` . k(int): The top k predictions for each class will be checked. Data type is int64 or int32. correct(Variable): The correct predictions count. A Tensor with type int64 or int32. total(Variable): The total entries count. A tensor with type int64 or int32. -- GitLab