【发布时间】:2023-04-08 01:13:02
【问题描述】:
#pred_probas is probabilities of each class type
def find_class_idx(label):
"""
Should return the class index of a particular label.
:param label: label of class
:type label: str
:return: class index
:rtype: int
"""
#ind = mx.nd.argmax(label, axis=1).astype('int')
topk_indices=mx.nd.topk(pred_probas,k=100)
return max(topk_indices)*100
【问题讨论】:
标签: python arrays function indexing mxnet