From e48d94ac605cd611a301eb0823d2d1aaac867f1a Mon Sep 17 00:00:00 2001 From: yancong Date: Thu, 29 Sep 2022 10:47:02 +0800 Subject: [PATCH] dev(Accuracy): unifiy docstrings --- mmeval/classification/accuracy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mmeval/classification/accuracy.py b/mmeval/classification/accuracy.py index a9eac14b..b0e1eb2e 100644 --- a/mmeval/classification/accuracy.py +++ b/mmeval/classification/accuracy.py @@ -27,9 +27,6 @@ def _numpy_topk(inputs: np.ndarray, This implementation returns the values and indices of the k largest elements along a given axis. - Note: - If PyTorch is available, the ``_torch_topk`` would be used. - Args: inputs (nump.ndarray): The input numpy array. k (int): The k in `top-k`. @@ -37,6 +34,9 @@ def _numpy_topk(inputs: np.ndarray, Returns: tuple: The values and indices of the k largest elements. + + Note: + If PyTorch is available, the ``_torch_topk`` would be used. """ if torch is not None: values, indices = _torch_topk(torch.from_numpy(inputs), k, dim=axis)