I am just starting out with libtorch and pytorch as well, so I apologize if I haven’t searched enough for an answer before posting.
Looking at some examplary code found online and trying that on my own machine I have stumbled upon this expression: target.eq(pred).sum().template item<int64_t>();
I have never seen a .template item<>() like expression in C++ before, maybe I am just too unexperienced  with templates in C++ but I don’t understand what that is. Is it some form of template metaprogramming that I am not familiar with? Or something libtorch specific?