Based on the error message it seems you are trying to pass a LongTensor as the input to a batch norm layer.
At least this code snippet raises this error:
bn = nn.BatchNorm2d(3)
x = torch.randn(2, 3, 24, 24)
out = bn(x) # works

x = x.long()
bn(x) # raises your error

Most layers are implemented for floating point types. What is your use case, that you are trying to pass a long/int tensor to the model?