docstr: Compute the weighted sum of quantile losses.
  
  Parameters
  ----------
  F
      A module that can either refer to the Symbol API or the NDArray
      API in MXNet.
  y_true
      ground truth values, shape (N1 x N2 x ... x Nk)
  y_pred
      predicted target, shape (N1 x N2 x ... x Nk x num_quantiles)
  sample_weight
      sample weights
  
  Returns
  -------
  Tensor
      weighted sum of the quantile losses, shape N1 x N1 x ... Nk
docstr_tok: ["Compute","the","weighted","sum","of","quantile","losses",".","Parameters","--","--","--","--","--","F","A","module","that","can","either","refer","to","the","Symbol","API","or","the","NDArray","API","in","MXNet",".","y_true","ground","truth","values",",","shape","(","N1","x","N2","x","...","x","Nk",")","y_pred","predicted","target",",","shape","(","N1","x","N2","x","...","x","Nk","x","num_quantiles",")","sample_weight","sample","weights","Returns","--","--","--","-","Tensor","weighted","sum","of","the","quantile","losses",",","shape","N1","x","N1","x","...","Nk"]
code: def hybrid_forward(
      self, F, y_true: Tensor, y_pred: Tensor, sample_weight=None
  ):
      """
      Compute the weighted sum of quantile losses.
  
      Parameters
      ----------
      F
          A module that can either refer to the Symbol API or the NDArray
          API in MXNet.
      y_true
          ground truth values, shape (N1 x N2 x ... x Nk)
      y_pred
          predicted target, shape (N1 x N2 x ... x Nk x num_quantiles)
      sample_weight
          sample weights
  
      Returns
      -------
      Tensor
          weighted sum of the quantile losses, shape N1 x N1 x ... Nk
      """
      if self.num_quantiles > 1:
          y_pred_all = F.split(
              y_pred,
              axis=-1,
              num_outputs=self.num_quantiles,
              squeeze_axis=1,
          )
      else:
          y_pred_all = [F.squeeze(y_pred, axis=-1)]
  
      qt_loss = []
      for level, weight, y_pred_q in zip(
          self.quantiles, self.quantile_weights, y_pred_all
      ):
          qt_loss.append(
              weight
              * self.compute_quantile_loss(F, y_true, y_pred_q, level)
          )
      stacked_qt_losses = F.stack(*qt_loss, axis=-1)
      sum_qt_loss = F.mean(
          stacked_qt_losses, axis=-1
      )  # avg across quantiles
      if sample_weight is not None:
          return sample_weight * sum_qt_loss
      return sum_qt_loss
  
imports: from typing import List, Optional
  from mxnet.gluon import nn
  from mxnet.gluon.loss import Loss
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
label_desc: Use image node_id 2 for calling the QuantileLoss obj's underlying member method code with example usage: obj.hybrid_forward(F, y_true, y_pred, sample_weight) and returns: sum_qt_loss, unknown