a.numpy()
改为
a.cpu().unmpy()
can't convert cuda:0 device type tensor to numpy.
Use Tensor.cpu() to copy the tensor to host memory first.
a.numpy()
改为
a.cpu().unmpy()
can't convert cuda:0 device type tensor to numpy.
Use Tensor.cpu() to copy the tensor to host memory first.