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 loss(
      self,
      past_target: torch.Tensor,
      past_observed_values: torch.Tensor,
      future_target: torch.Tensor,
      future_observed_values: torch.Tensor,
  ) -> torch.Tensor:
      distr_args, loc, scale = self(
          past_target=past_target,
          past_observed_values=past_observed_values,
      )
      loss = self.distr_output.loss(
          target=future_target,
          distr_args=distr_args,
          loc=loc,
          scale=scale,
      )
      return weighted_average(
          loss, weights=future_observed_values, dim=-1
      )
  
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 4 for calling the PatchTSTModel obj's underlying member method code with example usage: obj.loss(past_target, past_observed_values, future_target, future_observed_values) and returns: weighted_average