[Pytorch函数]loss,loss.cpu().data 及 loss.cpu().detach().numpy()等辨析
print('1111',loss)print('2222',loss.data)#tensor且GPUprint('3333',loss.cpu())print('4444',loss.cpu().data)#tensor且CPU#print('5555',loss.cpu().data[0])#报错IndexError:invalidindexofa0-dimtensor.Usetensor.