docstr: Parameters
  ----------
  F
      Function space
  feat_static_cat
      Shape: (batch_size, num_features)
  past_time_feat
      Shape: (batch_size, history_length, num_features)
  past_target
      Shape: (batch_size, history_length)
  
  Returns
  -------
  Tensor
      A batch of negative log likelihoods.
docstr_tok: ["Parameters","--","--","--","--","--","F","Function","space","feat_static_cat","Shape",":","(","batch_size",",","num_features",")","past_time_feat","Shape",":","(","batch_size",",","history_length",",","num_features",")","past_target","Shape",":","(","batch_size",",","history_length",")","Returns","--","--","--","-","Tensor","A","batch","of","negative","log","likelihoods","."]
code: def hybrid_forward(  # type: ignore
      self,
      F,
      feat_static_cat: Tensor,  # (batch_size, num_features)
      past_time_feat: Tensor,
      # (batch_size, num_features, history_length)
      past_target: Tensor,  # (batch_size, history_length)
  ) -> Tensor:
      """
      Parameters
      ----------
      F
          Function space
      feat_static_cat
          Shape: (batch_size, num_features)
      past_time_feat
          Shape: (batch_size, history_length, num_features)
      past_target
          Shape: (batch_size, history_length)
  
      Returns
      -------
      Tensor
          A batch of negative log likelihoods.
      """
      _, target_scale = self.scaler(
          past_target,
          F.ones_like(
              past_target
          ),  # TODO: pass the actual observed here
      )
  
      input_feat = self.assemble_features(
          F, feat_static_cat, past_time_feat
      )
      outputs = self.model(input_feat)
  
      distr = self.distr_output.distribution(
          self.proj_distr_args(outputs), scale=target_scale
      )
  
      loss = distr.loss(past_target)
  
      return loss
  
file_path: gluonts/src/gluonts/mx/model/canonical/_network.py
imports: from mxnet.gluon import HybridBlock
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.block.feature import FeatureEmbedder
  from gluonts.mx.block.scaler import MeanScaler
  from gluonts.mx.distribution import DistributionOutput
label_desc: Use image node_id 1 for calling the CanonicalTrainingNetwork obj's underlying member method code with example usage: obj.hybrid_forward(F, feat_static_cat, past_time_feat, past_target) and returns: loss