C++中如何将Tensor类型转换为基本类型呢?

int a = torch::Tensor(123).item<int>();

猜你喜欢

转载自blog.csdn.net/qq_38973721/article/details/121861868