code: def forward(
      self, past_target: torch.Tensor, future_target: torch.Tensor
  ) -> torch.Tensor:
      # m = max(torch.mean(past_target), torch.mean(future_target))
      # past_target /= m
      # future_target /= m
      nu = min(
          torch.mean(past_target).item(),
          torch.mean(future_target).item(),
      )
      past_target /= 1 + nu
      future_target /= 1 + nu
      # import pdb;pdb.set_trace()
  
      inputs = past_target.view(
          past_target.shape[1], past_target.shape[0], 1
      )
      lstm_out, _ = self.lstm(inputs)
      prediction = self.linear(lstm_out)
  
      loss = self.criterion(prediction[-1], future_target)
      return loss
  
file_path: gluonts/src/gluonts/nursery/SCott/model/lstm/lstm_network.py
imports: from typing import List
  import torch
  import torch.nn
label_desc: Use image node_id 1 for calling the LSTMTrainingNetwork obj's underlying member method code with example usage: obj.forward(past_target, future_target) and returns: loss