This error is raised, if you pass an input with a wrong number of channels to a batch norm layer as shown here:
bn = nn.BatchNorm2d(216)
x = torch.randn(1, 36, 4, 4) # dim1 should be 36!
out = bn(x)
> RuntimeError: running_mean should contain 36 elements not 216

Your code is hard to read, as you haven’t formatted it.
You can post code snippets by wrapping them into three backticks ```, which would make debugging easier.