There is! https://pytorch.org/cppdocs/api/function_namespaceat_1a5759854ee24eb9a93e7afd6c2f23aae4.html#exhale-function-namespaceat-1a5759854ee24eb9a93e7afd6c2f23aae4 8
Unfortunately there is no documentation besides the function declaration.
Hopefully it will work as a drop-in replacement in my code.
Edit: It worked! Well at least it succeeded without crashing. I’m now manually checking the output to see if it does what I think it should do (pixel-wise NLL loss, and then taking the mean)