class_docstr: MLP on the decoder.
  
  MLP that predicts output only based on information available in the decoder.
docstr: Forward network
docstr_tok: ["Forward","network"]
code: def forward(
      self, x: Dict[str, torch.Tensor], n_samples: int = None
  ) -> Dict[str, torch.Tensor]:
      """
      Forward network
      """
      # x is a batch generated based on the TimeSeriesDataset
      batch_size = x["decoder_lengths"].size(0)
      embeddings = self.input_embeddings(
          x["decoder_cat"]
      )  # returns dictionary with embedding tensors
      network_input = torch.cat(
          [x["decoder_cont"][..., self.decoder_reals_positions]]
          + list(embeddings.values()),
          dim=-1,
      )
      prediction = self.mlp(
          network_input.view(-1, self.mlp.input_size)
      ).view(batch_size, network_input.size(1), self.mlp.output_size)
  
      # cut prediction into pieces for multiple targets
      if self.n_targets > 1:
          prediction = torch.split(
              prediction, self.hparams.output_size, dim=-1
          )
  
      # We need to return a dictionary that at least contains the prediction
      # The parameter can be directly forwarded from the input.
      prediction = self.transform_output(
          prediction, target_scale=x["target_scale"]
      )
      return self.to_network_output(prediction=prediction)
  
file_path: pytorch-forecasting/pytorch_forecasting/models/mlp/__init__.py
imports: from typing import Dict, List, Tuple, Union
  import numpy
  import torch
  from torch import nn
  from pytorch_forecasting.data import TimeSeriesDataSet
  from pytorch_forecasting.metrics import MAE, MAPE, MASE, RMSE, SMAPE, MultiHorizonMetric, QuantileLoss
  from pytorch_forecasting.models.base_model import BaseModelWithCovariates
  from pytorch_forecasting.models.mlp.submodules import FullyConnectedModule
  from pytorch_forecasting.models.nn.embeddings import MultiEmbedding
label_desc: Use image node_id 3 for calling the DecoderMLP obj's underlying member method code with example usage: obj.forward(x, n_samples) and returns: self