TypeError: can’t convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor
** 在pytorch中,直接从cuda取数据,如output,cuda().data.numpy(),但是出错,TypeError: can’t convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor,所以改成output.cuda().data.cpu().numpy()即可解决。