docstr: Decompose rewards at the last step to individual steps.
docstr_tok: ["Decompose","rewards","at","the","last","step","to","individual","steps","."]
code: def __init__(
      self,
      state_dim: int,
      action_dim: int,
      sizes: List[int],
      activations: List[str],
      last_layer_activation: str,
      use_batch_norm: bool = False,
      use_layer_norm: bool = False,
  ):
      """
      Decompose rewards at the last step to individual steps.
      """
      super().__init__()
      modules: List[nn.Module] = [Concat()]
      prev_layer_size = state_dim + action_dim
      for size, activation in zip(sizes, activations):
          if use_batch_norm:
              modules.append(nn.BatchNorm1d(prev_layer_size))
          modules.append(nn.Linear(prev_layer_size, size))
          if use_layer_norm:
              modules.append(nn.LayerNorm(size))
          modules.append(ACTIVATION_MAP[activation]())
          prev_layer_size = size
      # last layer
      modules.append(nn.Linear(prev_layer_size, 1))
      modules.append(ACTIVATION_MAP[last_layer_activation]())
      self.dnn = SequentialMultiArguments(*modules)
  
imports: import logging
  import math
  from typing import List
  import torch
  import torch.nn
  import torch.nn.functional
  from reagent.core import parameters, types
  from reagent.models import convolutional_network, fully_connected_network
  from reagent.models.base import ModelBase
  from reagent.models.fully_connected_network import ACTIVATION_MAP
label_desc: Use image node_id 1 to create a new SingleStepSyntheticRewardNet object from inherited base classes: nn with example: obj = SingleStepSyntheticRewardNet(state_dim, action_dim, sizes, activations, last_layer_activation, use_batch_norm, use_layer_norm)