This is a relatively recent change, you may want to upgrade your pytorch version. Also I am not even sure that it is in the binary releases yet and may only be available with the source install.
For your problem, doesn’t the regular torch.mean does what you want?