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

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

Guess you like

Origin blog.csdn.net/qq_38973721/article/details/121861868