Interestingly
torch::std(tensor, integer)
does not call the function one would think it does but (at least in my case) instead calls
torch::std(Tensor t, bool b)
because the provided integer value is implicitly converted to a bool. I think this could be considered a bug or a design flaw, since this behaviour is counter intuitive and I think there will be more people using this the way I did. To provide the dimension along which to calculate the std deviation one has to explicitly call torch::std(tensor, integer, false)