The output for m and v end up to be a single-valued Tensor.
Instead they must be 16-valued Tensors.
You must replace the code to
m = torch.mean(x, dim= (0, 2,3))
v = torch.var(x, dim=(0, 2, 3), unbiased=False)