AttributeError: 'Tensor' object has no attribute 'argsort'

image_pred = image_pred[(-score).argsort()] yolov3程序调试时出错:pytorch的tensor没有argsort方法python 不但愿转成numpy再转回tensor,查阅手册发现 pytorch的sort同时返回了sorted和indices,代码修改成:web srtd, indices = torch.sort(-score) image
相关文章
相关标签/搜索