docstr: Predicts samples given the trained DeepVAR model.
  All tensors should have NTC layout.
  Parameters
  ----------
  target_dimension_indicator
      Indices of the target dimension (batch_size, target_dim)
  past_time_feat
      Dynamic features of past time series (batch_size, history_length,
      num_features)
  past_target_cdf
      Past marginal CDF transformed target values (batch_size,
      history_length, target_dim)
  past_observed_values
      Indicator whether or not the values were observed (batch_size,
      history_length, target_dim)
  past_is_pad
      Indicator whether the past target values have been padded
      (batch_size, history_length)
  future_time_feat
      Future time features (batch_size, prediction_length, num_features)
  
  Returns
  -------
  sample_paths : Tensor
      A tensor containing sampled paths (1, num_sample_paths,
      prediction_length, target_dim).
docstr_tok: ["Predicts","samples","given","the","trained","DeepVAR","model",".","All","tensors","should","have","NTC","layout",".","Parameters","--","--","--","--","--","target_dimension_indicator","Indices","of","the","target","dimension","(","batch_size",",","target_dim",")","past_time_feat","Dynamic","features","of","past","time","series","(","batch_size",",","history_length",",","num_features",")","past_target_cdf","Past","marginal","CDF","transformed","target","values","(","batch_size",",","history_length",",","target_dim",")","past_observed_values","Indicator","whether","or","not","the","values","were","observed","(","batch_size",",","history_length",",","target_dim",")","past_is_pad","Indicator","whether","the","past","target","values","have","been","padded","(","batch_size",",","history_length",")","future_time_feat","Future","time","features","(","batch_size",",","prediction_length",",","num_features",")","Returns","--","--","--","-","sample_paths",":","Tensor","A","tensor","containing","sampled","paths","(","1",",","num_sample_paths",",","prediction_length",",","target_dim",")","."]
code: def forward(
      self,
      target_dimension_indicator: torch.Tensor,
      past_time_feat: torch.Tensor,
      past_target_cdf: torch.Tensor,
      past_observed_values: torch.Tensor,
      past_is_pad: torch.Tensor,
      future_time_feat: torch.Tensor,
  ) -> torch.Tensor:
      """
      Predicts samples given the trained DeepVAR model.
      All tensors should have NTC layout.
      Parameters
      ----------
      target_dimension_indicator
          Indices of the target dimension (batch_size, target_dim)
      past_time_feat
          Dynamic features of past time series (batch_size, history_length,
          num_features)
      past_target_cdf
          Past marginal CDF transformed target values (batch_size,
          history_length, target_dim)
      past_observed_values
          Indicator whether or not the values were observed (batch_size,
          history_length, target_dim)
      past_is_pad
          Indicator whether the past target values have been padded
          (batch_size, history_length)
      future_time_feat
          Future time features (batch_size, prediction_length, num_features)
  
      Returns
      -------
      sample_paths : Tensor
          A tensor containing sampled paths (1, num_sample_paths,
          prediction_length, target_dim).
  
      """
  
      # mark padded data as unobserved
      # (batch_size, target_dim, seq_len)
      past_observed_values = torch.min(
          past_observed_values, 1 - past_is_pad.unsqueeze(-1)
      )
  
      inputs, scale, static_feat = self.create_network_input(
          past_time_feat=past_time_feat,
          past_target_cdf=past_target_cdf,
          past_observed_values=past_observed_values,
          past_is_pad=past_is_pad,
          future_time_feat=None,
          future_target_cdf=None,
          target_dimension_indicator=target_dimension_indicator,
      )
  
      enc_out = self.transformer.encoder(
          self.encoder_input(inputs).permute(1, 0, 2)
      )
  
      return self.sampling_decoder(
          past_target_cdf=past_target_cdf,
          target_dimension_indicator=target_dimension_indicator,
          time_feat=future_time_feat,
          scale=scale,
          enc_out=enc_out,
      )
  
file_path: gluonts/src/gluonts/nursery/robust-mts-attack/pts/model/transformer_tempflow/transformer_tempflow_network.py
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from gluonts.core.component import validated
  from pts.modules import RealNVP, MAF, FlowOutput, MeanScaler, NOPScaler
label_desc: Use image node_id 3 for calling the TransformerTempFlowPredictionNetwork obj's underlying member method code with example usage: obj.forward(target_dimension_indicator, past_time_feat, past_target_cdf, past_observed_values, past_is_pad, future_time_feat) and returns: self