把tensor转成int

eg. tensor(2) -> 2

tensor(2).item()

https://blog.csdn.net/zl535320706/article/details/81175372

你可能感兴趣的:(pytorch,python)