docstr: Compute negative log likelihood losses for given data.
  
  Parameters
  ----------
  F
  past_target
      shape (batch_size, history_length, 2). Expects a right-aligned
      ragged tensor containing the past data in an interval-size
      format.
  valid_length
      number of valid data points in each array of the batch. i.e.,
      non-valid points will be masked out. shape (batch_size, 1)
  interval_alpha_bias
  size_alpha_bias
  
  Returns
  -------
  loss
      negative log likelihood with shape (batch_size, history_length)
docstr_tok: ["Compute","negative","log","likelihood","losses","for","given","data",".","Parameters","--","--","--","--","--","F","past_target","shape","(","batch_size",",","history_length",",","2",")",".","Expects","a","right-aligned","ragged","tensor","containing","the","past","data","in","an","interval-size","format",".","valid_length","number","of","valid","data","points","in","each","array","of","the","batch",".","i.e.",",","non-valid","points","will","be","masked","out",".","shape","(","batch_size",",","1",")","interval_alpha_bias","size_alpha_bias","Returns","--","--","--","-","loss","negative","log","likelihood","with","shape","(","batch_size",",","history_length",")"]
code: def hybrid_forward(
      self,
      F,
      past_target,
      valid_length,
      interval_alpha_bias=None,
      size_alpha_bias=None,
      **kwargs,
  ) -> Tensor:
      """
      Compute negative log likelihood losses for given data.
  
      Parameters
      ----------
      F
      past_target
          shape (batch_size, history_length, 2). Expects a right-aligned
          ragged tensor containing the past data in an interval-size
          format.
      valid_length
          number of valid data points in each array of the batch. i.e.,
          non-valid points will be masked out. shape (batch_size, 1)
      interval_alpha_bias
      size_alpha_bias
  
      Returns
      -------
      loss
          negative log likelihood with shape (batch_size, history_length)
      """
      cond_mean = self.mu_map(past_target, shift=True)
      dist_interval, dist_size = self.distribution(
          cond_mean, interval_alpha_bias, size_alpha_bias
      )
      data_interval, data_size = F.split(
          past_target, num_outputs=2, axis=-1
      )
  
      # TODO: on windows, operators below may produce NaN values
  
      log_prob = F.squeeze(
          dist_interval.log_prob(data_interval - 1)
          + dist_size.log_prob(data_size - 1),
          axis=-1,
      )
      reverse_lengths = F.broadcast_sub(
          F.maximum(1, F.max(valid_length)), valid_length
      ).squeeze(-1)
      mask = F.SequenceMask(
          F.ones_like(log_prob),
          reverse_lengths,
          use_sequence_length=True,
          axis=1,
      )
      loss = -F.where(1 - mask, log_prob, F.zeros_like(log_prob))
  
      return loss
  
imports: from typing import Optional, Tuple
  import mxnet
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.distribution import Distribution, DistributionOutput
  from gluonts.mx.distribution.distribution import getF
  from mxnet import gluon
label_desc: Use image node_id 1 for calling the DeepRenewalTrainingNetwork obj's underlying member method code with example usage: obj.hybrid_forward(F, past_target, valid_length, interval_alpha_bias, size_alpha_bias) and returns: loss