Add some description of InTopK op in API.

pull/6482/head
liuxiao93 5 years ago
parent faa0a6ad45
commit 0a28c79fe0

@ -41,7 +41,7 @@ class ReduceLogSumExp(Cell):
Default : False. Default : False.
Inputs: Inputs:
- **input_x** (Tensor[Number]) - The input tensor. - **input_x** (Tensor[Number]) - The input tensor. With float16 or float32 data type.
- **axis** (Union[int, tuple(int), list(int)]) - The dimensions to reduce. Default: (), reduce all dimensions. - **axis** (Union[int, tuple(int), list(int)]) - The dimensions to reduce. Default: (), reduce all dimensions.
Only constant value is allowed. Only constant value is allowed.

@ -4365,11 +4365,11 @@ class SparseApplyProximalAdagrad(PrimitiveWithCheck):
Inputs: Inputs:
- **var** (Parameter) - Variable tensor to be updated. The data type must be float16 or float32. - **var** (Parameter) - Variable tensor to be updated. The data type must be float16 or float32.
- **accum** (Parameter) - Variable tensor to be updated, has the same dtype as `var`. - **accum** (Parameter) - Variable tensor to be updated, has the same dtype as `var`.
- **lr** (Union[Number, Tensor]) - The learning rate value. should be a float number or - **lr** (Union[Number, Tensor]) - The learning rate value, should be a float number or
a scalar tensor with float16 or float32 data type. a scalar tensor with float16 or float32 data type.
- **l1** (Union[Number, Tensor]) - l1 regularization strength. should be a float number or - **l1** (Union[Number, Tensor]) - l1 regularization strength, should be a float number or
a scalar tensor with float16 or float32 data type. a scalar tensor with float16 or float32 data type.
- **l2** (Union[Number, Tensor]) - l2 regularization strength. should be a float number or - **l2** (Union[Number, Tensor]) - l2 regularization strength, should be a float number or
a scalar tensor with float16 or float32 data type.. a scalar tensor with float16 or float32 data type..
- **grad** (Tensor) - A tensor of the same type as `var`, for the gradient. - **grad** (Tensor) - A tensor of the same type as `var`, for the gradient.
- **indices** (Tensor) - A vector of indices in the first dimension of `var` and `accum`. - **indices** (Tensor) - A vector of indices in the first dimension of `var` and `accum`.
@ -5444,7 +5444,8 @@ class InTopK(PrimitiveWithInfer):
Inputs: Inputs:
- **x1** (Tensor) - A 2D Tensor defines the predictions of a batch of samples with float16 or float32 data type. - **x1** (Tensor) - A 2D Tensor defines the predictions of a batch of samples with float16 or float32 data type.
- **x2** (Tensor) - A 1D Tensor defines the labels of a batch of samples with int32 data type. The size of x2 - **x2** (Tensor) - A 1D Tensor defines the labels of a batch of samples with int32 data type. The size of x2
must be equal to x1's first dimension. must be equal to x1's first dimension. The values of `x2` can not be negative and
must be equal to or less than index of x1's second dimension.
Outputs: Outputs:
Tensor has 1 dimension of type bool and the same shape with `x2`. For labeling sample `i` in `x2`, Tensor has 1 dimension of type bool and the same shape with `x2`. For labeling sample `i` in `x2`,

Loading…
Cancel
Save