Hi, All
In pytorch it is
Prob_label = torch.gather(output_label, 1, y.unsqueeze(1))
In libtorch, I write it as
torch::Tensor prob_label = torch::Tensor::gather(output_label, 1, y.unsqueeze(1),false);
it gives the error on “torch:Tenosr::gather”  as call to non-static member function without an object argument.
Any comment is appreciated.
Thanks.