class_docstr: Extends `DeepNTPSNetwork` by implementing the output layer which
  converts the outputs from the base network into probabilities of length
  `context_length`. These probabilities together with the past values in the
  context window constitute the one-step-ahead forecast distribution.
  Specifically, the forecast is always one of the values observed in the
  context window with the corresponding predicted probability.
  
  Parameters
  ----------
  *args
      Arguments to ``DeepNPTSNetwork``.
  use_softmax
      Flag indicating whether to use softmax or normalization for
      converting the outputs of the base network to probabilities.
  kwargs
      Keyword arguments to ``DeepNPTSNetwork``.
class_docstr_tok: ["Extends","`","DeepNTPSNetwork","`","by","implementing","the","output","layer","which","converts","the","outputs","from","the","base","network","into","probabilities","of","length","`","context_length","`",".","These","probabilities","together","with","the","past","values","in","the","context","window","constitute","the","one-step-ahead","forecast","distribution",".","Specifically",",","the","forecast","is","always","one","of","the","values","observed","in","the","context","window","with","the","corresponding","predicted","probability",".","Parameters","--","--","--","--","--","*","args","Arguments","to","``","DeepNPTSNetwork","``",".","use_softmax","Flag","indicating","whether","to","use","softmax","or","normalization","for","converting","the","outputs","of","the","base","network","to","probabilities",".","kwargs","Keyword","arguments","to","``","DeepNPTSNetwork","``","."]
code: def __init__(self, *args, use_softmax: bool = False, **kwargs):
      super().__init__(*args, **kwargs)
      self.use_softmax = use_softmax
      modules: List[nn.Module] = (
          []
          if self.dropout_rate > 0
          else [nn.Dropout(self.dropout_rate)]
      )
      modules.append(
          nn.Linear(self.num_hidden_nodes[-1], self.context_length)
      )
      self.output_layer = nn.Sequential(*modules)
      self.output_layer.apply(init_weights)
  
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 1 to create a new DeepNPTSNetworkDiscrete object from inherited base classes: DeepNPTSNetwork with example: obj = DeepNPTSNetworkDiscrete()