作用. 取一个tensor的topk元素. 2.使用方法. dim=0表示按照列求topn,dim=1表示按照行求topn,None情况下,dim=1. 任务一:. 取top1:. pred = torch.tensor([[-0.5816 ...
確定! 回上一頁