docstr: Parameters
  ----------
  F
      Function space
  feat_static_cat
      Shape: (batch_size, 1)
  past_time_feat
      Shape: (batch_size, history_length, num_features)
  future_time_feat
      Shape: (batch_size, prediction_length, num_features)
  past_target
      Shape: (batch_size, history_length)
  
  Returns
  -------
  Tensor
      Samples of shape (batch_size, num_samples, prediction_length).
docstr_tok: ["Parameters","--","--","--","--","--","F","Function","space","feat_static_cat","Shape",":","(","batch_size",",","1",")","past_time_feat","Shape",":","(","batch_size",",","history_length",",","num_features",")","future_time_feat","Shape",":","(","batch_size",",","prediction_length",",","num_features",")","past_target","Shape",":","(","batch_size",",","history_length",")","Returns","--","--","--","-","Tensor","Samples","of","shape","(","batch_size",",","num_samples",",","prediction_length",")","."]
code: def hybrid_forward(
      self,
      F,
      feat_static_cat: Tensor,
      past_time_feat: Tensor,
      future_time_feat: Tensor,
      past_target: Tensor,
  ) -> Tensor:
      """
      Parameters
      ----------
      F
          Function space
      feat_static_cat
          Shape: (batch_size, 1)
      past_time_feat
          Shape: (batch_size, history_length, num_features)
      future_time_feat
          Shape: (batch_size, prediction_length, num_features)
      past_target
          Shape: (batch_size, history_length)
  
      Returns
      -------
      Tensor
          Samples of shape (batch_size, num_samples, prediction_length).
      """
      time_feat = F.concat(past_time_feat, future_time_feat, dim=1)
      fixed_effect, random_effect = self.compute_global_local(
          F, feat_static_cat, time_feat
      )
  
      samples = F.concat(
          *[
              F.sample_normal(fixed_effect, random_effect)
              for _ in range(self.num_parallel_samples)
          ],
          dim=2,
      )  # (batch_size, train_len + prediction_len, num_samples)
      pred_samples = F.slice_axis(
          samples, axis=1, begin=-self.prediction_len, end=None
      )  # (batch_size, prediction_len, num_samples)
  
      return pred_samples.swapaxes(1, 2)
  
file_path: gluonts/src/gluonts/mx/model/deep_factor/_network.py
imports: from typing import Tuple
  import math
  from mxnet.gluon import HybridBlock, nn
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.block.feature import FeatureEmbedder
label_desc: Use image node_id 2 for calling the DeepFactorPredictionNetwork obj's underlying member method code with example usage: obj.hybrid_forward(F, feat_static_cat, past_time_feat, future_time_feat, past_target) and returns: pred_samples