class_docstr: Base Recurrent
  
  Base class for all recurrent-based models. The forecasts are produced sequentially between
  windows.
  
  This class implements the basic functionality for all windows-based models, including:
  - PyTorch Lightning's methods training_step, validation_step, predict_step. <br>
  - fit and predict methods used by NeuralForecast.core class. <br>
  - sampling and wrangling methods to sequential windows. <br>
class_docstr_tok: ["Base","Recurrent","Base","class","for","all","recurrent-based","models",".","The","forecasts","are","produced","sequentially","between","windows",".","This","class","implements","the","basic","functionality","for","all","windows-based","models",",","including",":","-","PyTorch","Lightning","'s","methods","training_step",",","validation_step",",","predict_step",".","<","br",">","-","fit","and","predict","methods","used","by","NeuralForecast.core","class",".","<","br",">","-","sampling","and","wrangling","methods","to","sequential","windows",".","<","br",">"]
code: def _inv_normalization(self, y_hat, temporal_cols, y_idx):
      # Receives window predictions [B, seq_len, H, output]
      # Broadcasts outputs and inverts normalization
  
      # Get 'y' scale and shift, and add W dimension
      y_loc = self.scaler.x_shift[
          :, [y_idx], 0
      ].flatten()  # [B,C,T] -> [B]
      y_scale = self.scaler.x_scale[
          :, [y_idx], 0
      ].flatten()  # [B,C,T] -> [B]
  
      # Expand scale and shift to y_hat dimensions
      y_loc = y_loc.view(
          *y_loc.shape, *(1,) * (y_hat.ndim - 1)
      )  # .expand(y_hat)
      y_scale = y_scale.view(
          *y_scale.shape, *(1,) * (y_hat.ndim - 1)
      )  # .expand(y_hat)
  
      y_hat = self.scaler.inverse_transform(
          z=y_hat, x_scale=y_scale, x_shift=y_loc
      )
  
      return y_hat, y_loc, y_scale
  
imports: import random
  import warnings
  import numpy
  import torch
  import torch.nn
  import pytorch_lightning
  from pytorch_lightning.callbacks import TQDMProgressBar
  from pytorch_lightning.callbacks.early_stopping import EarlyStopping
  from ._scalers import TemporalNorm
  from ..tsdataset import TimeSeriesDataModule
  from ..utils import get_indexer_raise_missing
label_desc: Use image node_id 7 for calling the BaseRecurrent obj's underlying member method code with example usage: obj._inv_normalization(y_hat, temporal_cols, y_idx) and returns: y_hat,  y_loc,  y_scale