what the size of the tensor going to batch normalization
maybe you are trying to use batch normalization without giving it a batch
when you do not have a batch freeze batch normalization using:
state = torch.from_numpy(state).float()
NetworkName.eval() # Sets the module in evaluation mode (no batchnorm or dropout)
with torch.no_grad(): # no need to calculate gradients now, we are not training (save resources)
action_values =  NetworkName(state)
NetworkName.train() # # Sets the module back in training mode
when you have a batch use:
NetworkName.forward(states)