class_docstr: Base class implementing a simple feed-forward neural network that takes
  in static and dynamic features and produces `num_hidden_nodes` independent
  outputs. These outputs are then used by derived classes to construct the
  forecast distribution for a single time step.
  
  Note that the dynamic features are just treated as independent features
  without considering their temporal nature.
class_docstr_tok: ["Base","class","implementing","a","simple","feed-forward","neural","network","that","takes","in","static","and","dynamic","features","and","produces","`","num_hidden_nodes","`","independent","outputs",".","These","outputs","are","then","used","by","derived","classes","to","construct","the","forecast","distribution","for","a","single","time","step",".","Note","that","the","dynamic","features","are","just","treated","as","independent","features","without","considering","their","temporal","nature","."]
docstr: Parameters
  ----------
  feat_static_cat
      Shape (-1, num_features).
  feat_static_real
      Shape (-1, num_features).
  past_target
      Shape (-1, context_length).
  past_observed_values
      Shape (-1, context_length).
  past_time_feat
      Shape (-1, context_length, self.num_time_features).
docstr_tok: ["Parameters","--","--","--","--","--","feat_static_cat","Shape","(","-1",",","num_features",")",".","feat_static_real","Shape","(","-1",",","num_features",")",".","past_target","Shape","(","-1",",","context_length",")",".","past_observed_values","Shape","(","-1",",","context_length",")",".","past_time_feat","Shape","(","-1",",","context_length",",","self.num_time_features",")","."]
code: def forward(
      self,
      feat_static_cat: torch.Tensor,
      feat_static_real: torch.Tensor,
      past_target: torch.Tensor,
      past_observed_values: torch.Tensor,
      past_time_feat: torch.Tensor,
  ):
      """
      Parameters
      ----------
      feat_static_cat
          Shape (-1, num_features).
      feat_static_real
          Shape (-1, num_features).
      past_target
          Shape (-1, context_length).
      past_observed_values
          Shape (-1, context_length).
      past_time_feat
          Shape (-1, context_length, self.num_time_features).
      """
      x = past_target
      if self.input_scaling:
          loc, scale = self.input_scaling(x)
          x_scaled = (x - loc) / scale
      else:
          x_scaled = x
  
      embedded_cat = self.embedder(feat_static_cat)
      static_feat = torch.cat(
          (embedded_cat, torch.tensor(feat_static_real)),
          dim=1,
      )
      time_features = torch.cat(
          [
              x_scaled.unsqueeze(dim=-1),
              past_observed_values.unsqueeze(dim=-1),
              past_time_feat,
          ],
          dim=-1,
      )
  
      features = torch.cat(
          [
              time_features.reshape(time_features.shape[0], -1),
              static_feat,
          ],
          dim=-1,
      )
      return self.model(features)
  
imports: from functools import partial
  from typing import Optional, Callable, List, Union
  import torch
  from torch import nn
  from torch.distributions import Categorical, MixtureSameFamily, Normal
  from gluonts.core.component import validated
  from gluonts.torch.distributions import DiscreteDistribution
  from .scaling import min_max_scaling, standard_normal_scaling
label_desc: Use image node_id 2 for calling the DeepNPTSNetwork obj's underlying member method code with example usage: obj.forward(feat_static_cat, feat_static_real, past_target, past_observed_values, past_time_feat) and returns: self