docstr: Computes the training loss for the wavenet model.
  
  Parameters
  ----------
  F
  feat_static_cat
      Static categorical features: (batch_size, num_cat_features)
  past_target
      Past target: (batch_size, receptive_field)
  past_observed_values
      Observed value indicator for the past target: (batch_size,
      receptive_field)
  past_time_feat
      Past time features: (batch_size, num_time_features,
      receptive_field)
  future_time_feat
      Future time features: (batch_size, num_time_features, pred_length)
  future_target
      Target on which the loss is computed: (batch_size, pred_length)
  future_observed_values
      Observed value indicator for the future target:
      (batch_size, pred_length).
  scale
      scale of the time series: (batch_size, 1)
  
  Returns
  -------
  Tensor
      Returns loss with shape (batch_size,)
docstr_tok: ["Computes","the","training","loss","for","the","wavenet","model",".","Parameters","--","--","--","--","--","F","feat_static_cat","Static","categorical","features",":","(","batch_size",",","num_cat_features",")","past_target","Past","target",":","(","batch_size",",","receptive_field",")","past_observed_values","Observed","value","indicator","for","the","past","target",":","(","batch_size",",","receptive_field",")","past_time_feat","Past","time","features",":","(","batch_size",",","num_time_features",",","receptive_field",")","future_time_feat","Future","time","features",":","(","batch_size",",","num_time_features",",","pred_length",")","future_target","Target","on","which","the","loss","is","computed",":","(","batch_size",",","pred_length",")","future_observed_values","Observed","value","indicator","for","the","future","target",":","(","batch_size",",","pred_length",")",".","scale","scale","of","the","time","series",":","(","batch_size",",","1",")","Returns","--","--","--","-","Tensor","Returns","loss","with","shape","(","batch_size",",",")"]
code: def hybrid_forward(
      self,
      F,
      feat_static_cat: Tensor,
      past_target: Tensor,
      past_observed_values: Tensor,
      past_time_feat: Tensor,
      future_time_feat: Tensor,
      future_target: Tensor,
      future_observed_values: Tensor,
      scale: Tensor,
  ) -> Tensor:
      """
      Computes the training loss for the wavenet model.
  
      Parameters
      ----------
      F
      feat_static_cat
          Static categorical features: (batch_size, num_cat_features)
      past_target
          Past target: (batch_size, receptive_field)
      past_observed_values
          Observed value indicator for the past target: (batch_size,
          receptive_field)
      past_time_feat
          Past time features: (batch_size, num_time_features,
          receptive_field)
      future_time_feat
          Future time features: (batch_size, num_time_features, pred_length)
      future_target
          Target on which the loss is computed: (batch_size, pred_length)
      future_observed_values
          Observed value indicator for the future target:
          (batch_size, pred_length).
      scale
          scale of the time series: (batch_size, 1)
  
      Returns
      -------
      Tensor
          Returns loss with shape (batch_size,)
      """
      full_target = F.concat(past_target, future_target, dim=-1).astype(
          "int32"
      )
      full_features = self.get_full_features(
          F,
          feat_static_cat=feat_static_cat,
          past_observed_values=past_observed_values,
          past_time_feat=past_time_feat,
          future_time_feat=future_time_feat,
          future_observed_values=future_observed_values,
          scale=scale,
      )
      embedding = self.target_feature_embedding(
          F,
          F.slice_axis(full_target, begin=0, end=-1, axis=-1),
          F.slice_axis(full_features, begin=1, end=None, axis=-1),
      )
      unnormalized_output, _ = self.base_net(F, embedding)
  
      label = F.slice_axis(
          full_target, begin=self.receptive_field, end=None, axis=-1
      )
  
      full_observed = F.expand_dims(
          F.concat(
              past_observed_values, future_observed_values, dim=-1
          ),
          axis=1,
      )
      loss_weight = F.slice_axis(
          full_observed, begin=self.receptive_field, end=None, axis=-1
      )
      loss_weight = F.expand_dims(loss_weight, axis=2)
      loss = self.cross_entropy_loss(
          unnormalized_output, label, loss_weight
      )
      return loss
  
imports: import math
  from typing import List, Optional
  import mxnet
  from mxnet import gluon
  from mxnet.gluon import 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 1 for calling the WaveNetTraining obj's underlying member method code with example usage: obj.hybrid_forward(F, feat_static_cat, past_target, past_observed_values, past_time_feat, future_time_feat, future_target, future_observed_values, scale) and returns: loss