Thanks a lot.
I modified the code to be torch::max(x,1 false) but it is still incorrect
“No viable conversion from returned value of type ‘std::tuple<Tensor, Tensor>’ to function return type ‘torch::Tensor’”