code: def forward(
      self,
      past_target: torch.Tensor,
      past_observed_values: torch.Tensor,
  ) -> torch.Tensor:
      scaled_past_target, scale = self.scaler(
          past_target[..., -self.context_length :],  # [B, C, T]
          past_observed_values[
              ..., -self.context_length :
          ],  # [B, C, T]
      )
  
      # CNN
      c = F.relu(self.cnn(scaled_past_target.unsqueeze(1)))
      c = self.dropout(c)
      c = c.squeeze(2)  # [B, C, T]
  
      # RNN
      r = c.permute(2, 0, 1)  # [F (T), B, C]
      _, r = self.rnn(r)  # [1, B, H]
      r = self.dropout(r.squeeze(0))  # [B, H]
  
      # Skip-RNN
      skip_c = c[..., -self.conv_skip * self.skip_size :]
      skip_c = skip_c.reshape(
          -1, self.channels, self.conv_skip, self.skip_size
      )
      skip_c = skip_c.permute(2, 0, 3, 1)
      skip_c = skip_c.reshape((self.conv_skip, -1, self.channels))
      _, skip_c = self.skip_rnn(skip_c)
      skip_c = skip_c.reshape(
          (-1, self.skip_size * self.skip_rnn_num_cells)
      )
      skip_c = self.dropout(skip_c)
  
      res = self.fc(torch.cat((r, skip_c), 1)).unsqueeze(-1)
  
      # Highway
      ar_x = scaled_past_target[..., -self.ar_window :]
      ar_x = ar_x.reshape(-1, self.ar_window)
  
      ar_x = self.ar_fc(ar_x)
      if self.horizon:
          ar_x = ar_x.reshape(-1, self.num_series, 1)
      else:
          ar_x = ar_x.reshape(
              -1, self.num_series, self.prediction_length
          )
      out = res + ar_x
  
      if self.output_activation is None:
          return out, scale
  
      return (
          (
              torch.sigmoid(out)
              if self.output_activation == "sigmoid"
              else torch.tanh(out)
          ),
          scale,
      )
  
file_path: gluonts/src/gluonts/nursery/robust-mts-attack/pts/model/lstnet/lstnet_network.py
imports: from typing import List, Tuple, Optional
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from pts.modules import MeanScaler, NOPScaler
label_desc: Use image node_id 2 for calling the LSTNetBase obj's underlying member method code with example usage: obj.forward(past_target, past_observed_values) and returns: unknown,  scale, out,  scale