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,
      lstm_hidden_size: int,
      lstm_num_layers: int,
      lstm_bidirectional: bool,
      last_layer_activation: str,
  ):
      """
      Decompose rewards at the last step to individual steps.
      """
      super().__init__()
  
      self.state_dim = state_dim
      self.action_dim = action_dim
  
      self.lstm_hidden_size = lstm_hidden_size
      self.lstm_num_layers = lstm_num_layers
      self.lstm_bidirectional = lstm_bidirectional
  
      self.lstm = nn.LSTM(
          input_size=self.state_dim + self.action_dim,
          hidden_size=self.lstm_hidden_size,
          num_layers=self.lstm_num_layers,
          bidirectional=self.lstm_bidirectional,
      )
  
      if self.lstm_bidirectional:
          self.fc_out = nn.Linear(self.lstm_hidden_size * 2, 1)
      else:
          self.fc_out = nn.Linear(self.lstm_hidden_size, 1)
  
      self.output_activation = ACTIVATION_MAP[last_layer_activation]()
  
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 SequenceSyntheticRewardNet object from inherited base classes: nn with example: obj = SequenceSyntheticRewardNet(state_dim, action_dim, lstm_hidden_size, lstm_num_layers, lstm_bidirectional, last_layer_activation)