It is an error that happens quite often but there is no canonical solution as it depends on what your code does.
Basically your code modifies inplace a Tensor that this batchnorm needs to compute its backward. You need to remove that inplace operation. But where that inplace is depends a lot on your code and what you do