API 相关说明
Calculates the classification accuracy given predicted logits and ground-truth labels.
logits (Tensor) – model predictions of shape [batch_size, num_classes], representing the probability (likelyhood) of each class.
Tensor
target (Tensor) – ground-truth labels, 1d tensor of int32.
topk (Union[int, Iterable[int]]) – specifies the topk values, could be an int or tuple of ints. Default: 1
Union
int
Iterable
Union[Tensor, Iterable[Tensor]]
tensor(s) of classification accuracy between 0.0 and 1.0.
上一页
megengine.functional.nn.embedding
下一页
megengine.functional.nn.l1_loss