Skip to content

Commit

Permalink
dev(Accuracy): unifiy docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-tong committed Sep 29, 2022
1 parent b840f72 commit e48d94a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mmeval/classification/accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ 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`.
axis (int, optional): The axis to sort along.
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)
Expand Down

0 comments on commit e48d94a

Please sign in to comment.