class_docstr: Example of a TorchModelV2 using batch normalization.
code: def __init__(
      self,
      obs_space,
      action_space,
      num_outputs,
      model_config,
      name,
      **kwargs,
  ):
      TorchModelV2.__init__(
          self, obs_space, action_space, num_outputs, model_config, name
      )
      nn.Module.__init__(self)
      layers = []
      prev_layer_size = int(np.product(obs_space.shape))
      self._logits = None
  
      # Create layers 0 to second-last.
      for size in [256, 256]:
          layers.append(
              SlimFC(
                  in_size=prev_layer_size,
                  out_size=size,
                  initializer=torch_normc_initializer(1.0),
                  activation_fn=nn.ReLU,
              )
          )
          prev_layer_size = size
          # Add a batch norm layer.
          layers.append(nn.BatchNorm1d(prev_layer_size))
  
      self._logits = SlimFC(
          in_size=prev_layer_size,
          out_size=self.num_outputs,
          initializer=torch_normc_initializer(0.01),
          activation_fn=None,
      )
  
      self._value_branch = SlimFC(
          in_size=prev_layer_size,
          out_size=1,
          initializer=torch_normc_initializer(1.0),
          activation_fn=None,
      )
  
      self._hidden_layers = nn.Sequential(*layers)
      self._hidden_out = None
  
imports: import numpy
  from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.models.tf.misc import normc_initializer
  from ray.rllib.models.tf.tf_modelv2 import TFModelV2
  from ray.rllib.models.torch.misc import SlimFC, normc_initializer
  from ray.rllib.models.torch.torch_modelv2 import TorchModelV2
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
label_desc: Use image node_id 1 to create a new TorchBatchNormModel object from inherited base classes: TorchModelV2, nn with example: obj = TorchBatchNormModel(obs_space, action_space, num_outputs, model_config, name)