PyTorch C++ torch::var(tensor)

torch::Tensor out = torch::randn({100, 12}).toType(torch::kFloat32);
std::cout << torch::mean(out, 0).sizes() << "\n";
std::cout << torch::var(out, 0).sizes() << "\n";

[12]
[]

Anyone know whats wrong?

Hi,

I guess your compiler is confusing this overload and this overload.
I guess that passing all the arguments would solve this: torch::var(out, 0, true, false)

thanks that solve it