class_docstr: Module implementing the PatchTST model for forecasting as described in
  https://arxiv.org/abs/2211.14730 extended to be probabilistic.
  
  Parameters
  ----------
  prediction_length
      Number of time points to predict.
  context_length
      Number of time steps prior to prediction time that the model.
  distr_output
      Distribution to use to evaluate observations and sample predictions.
      Default: ``StudentTOutput()``.
class_docstr_tok: ["Module","implementing","the","PatchTST","model","for","forecasting","as","described","in","https",":","\/\/arxiv.org\/abs\/2211.14730","extended","to","be","probabilistic",".","Parameters","--","--","--","--","--","prediction_length","Number","of","time","points","to","predict",".","context_length","Number","of","time","steps","prior","to","prediction","time","that","the","model",".","distr_output","Distribution","to","use","to","evaluate","observations","and","sample","predictions",".","Default",":","``","StudentTOutput","(",")","``","."]
code: def forward(
      self,
      past_target: torch.Tensor,
      past_observed_values: torch.Tensor,
  ) -> Tuple[Tuple[torch.Tensor, ...], torch.Tensor, torch.Tensor]:
      # scale the input
      past_target_scaled, loc, scale = self.scaler(
          past_target, past_observed_values
      )
  
      # do patching
      if self.padding_patch == "end":
          past_target_scaled = self.padding_patch_layer(
              past_target_scaled
          )
      past_target_patches = past_target_scaled.unfold(
          dimension=1, size=self.patch_len, step=self.stride
      )
  
      # add loc and scale to past_target_patches as additional features
      log_abs_loc = loc.abs().log1p()
      log_scale = scale.log()
      expanded_static_feat = unsqueeze_expand(
          torch.cat([log_abs_loc, log_scale], dim=-1),
          dim=1,
          size=past_target_patches.shape[1],
      )
      inputs = torch.cat(
          (past_target_patches, expanded_static_feat), dim=-1
      )
  
      # project patches
      enc_in = self.patch_proj(inputs)
      embed_pos = self.positional_encoding(enc_in.size())
  
      # transformer encoder with positional encoding
      enc_out = self.encoder(enc_in + embed_pos)
  
      # flatten and project to prediction length * d_model
      flatten_out = self.flatten(enc_out.flatten(start_dim=1))
  
      # project to distribution arguments
      distr_args = self.args_proj(
          flatten_out.reshape(-1, self.prediction_length, self.d_model)
      )
      return distr_args, loc, scale
  
imports: from typing import Tuple
  import numpy
  import torch
  from torch import nn
  from gluonts.core.component import validated
  from gluonts.model import Input, InputSpec
  from gluonts.torch.distributions import StudentTOutput
  from gluonts.torch.scaler import StdScaler, MeanScaler, NOPScaler
  from gluonts.torch.util import unsqueeze_expand, weighted_average
  from gluonts.torch.model.simple_feedforward import make_linear_layer
label_desc: Use image node_id 3 for calling the PatchTSTModel obj's underlying member method code with example usage: obj.forward(past_target, past_observed_values) and returns: distr_args,  loc,  scale