Tensor.cpu().detach().numpy().tolist()
这样就可以转为int
参考:
https://discuss.pytorch.org/t/fastest-way-to-convert-tensor-to-float/21282
Tensor.cpu().detach().numpy().tolist()
这样就可以转为int
参考:
https://discuss.pytorch.org/t/fastest-way-to-convert-tensor-to-float/21282