解决 can’t convert CUDA tensor to numpy取分类索引直接使用 torch.argmax

报错 can’t convert CUDA tensor to numpy 的根本原因是:CUDA 显存上的 Tensor 不能直接调用 numpy(),很多人在拿到模型输出