docstr: Predicts samples, all tensors should have NTC layout.
  Parameters
  ----------
  feat_static_cat : (batch_size, num_features)
  feat_static_real : (batch_size, num_features)
  past_time_feat : (batch_size, history_length, num_features)
  past_target : (batch_size, history_length, *target_shape)
  past_observed_values : (batch_size, history_length, *target_shape)
  future_time_feat : (batch_size, prediction_length, num_features)
  Returns predicted samples
  -------
docstr_tok: ["Predicts","samples",",","all","tensors","should","have","NTC","layout",".","Parameters","--","--","--","--","--","feat_static_cat",":","(","batch_size",",","num_features",")","feat_static_real",":","(","batch_size",",","num_features",")","past_time_feat",":","(","batch_size",",","history_length",",","num_features",")","past_target",":","(","batch_size",",","history_length",",","*","target_shape",")","past_observed_values",":","(","batch_size",",","history_length",",","*","target_shape",")","future_time_feat",":","(","batch_size",",","prediction_length",",","num_features",")","Returns","predicted","samples","--","--","--","-"]
code: def forward(
      self,
      feat_static_cat: torch.Tensor,
      feat_static_real: torch.Tensor,
      past_time_feat: torch.Tensor,
      past_target: torch.Tensor,
      past_observed_values: torch.Tensor,
      future_time_feat: torch.Tensor,
  ) -> torch.Tensor:
      """
      Predicts samples, all tensors should have NTC layout.
      Parameters
      ----------
      feat_static_cat : (batch_size, num_features)
      feat_static_real : (batch_size, num_features)
      past_time_feat : (batch_size, history_length, num_features)
      past_target : (batch_size, history_length, *target_shape)
      past_observed_values : (batch_size, history_length, *target_shape)
      future_time_feat : (batch_size, prediction_length, num_features)
      Returns predicted samples
      -------
      """
  
      # create the inputs for the encoder
      inputs, scale, static_feat = self.create_network_input(
          feat_static_cat=feat_static_cat,
          feat_static_real=feat_static_real,
          past_time_feat=past_time_feat,
          past_target=past_target,
          past_observed_values=past_observed_values,
          future_time_feat=None,
          future_target=None,
      )
  
      # pass through encoder
      enc_out = self.transformer.encoder(
          self.encoder_input(inputs).permute(1, 0, 2)
      )
  
      return self.sampling_decoder(
          past_target=past_target,
          time_feat=future_time_feat,
          static_feat=static_feat,
          scale=scale,
          enc_out=enc_out,
      )
  
file_path: gluonts/src/gluonts/nursery/robust-mts-attack/pts/model/transformer/transformer_network.py
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from gluonts.core.component import validated
  from gluonts.torch.modules.distribution_output import DistributionOutput
  from pts.modules import MeanScaler, NOPScaler, FeatureEmbedder
label_desc: Use image node_id 3 for calling the TransformerPredictionNetwork obj's underlying member method code with example usage: obj.forward(feat_static_cat, feat_static_real, past_time_feat, past_target, past_observed_values, future_time_feat) and returns: self