使用对numpy数组排序numpy.argsort公司(). 使用将结果转换为张量纽比的火炬(). import torch import numpy as np A = [0,1,2,3,0,0,1,1,2,2,3,3] x = np.array(A) ...
確定! 回上一頁