docstr: Applies sigmoid scaling to the output of the model if the task is regression and the target range is defined.
  
  Args:
      y_hat (torch.Tensor): The output of the model
  
  Returns:
      torch.Tensor: The output of the model with sigmoid scaling applied
code: def apply_output_sigmoid_scaling(
      self, y_hat: torch.Tensor
  ) -> torch.Tensor:
      """Applies sigmoid scaling to the output of the model if the task is regression and the target range is defined.
  
      Args:
          y_hat (torch.Tensor): The output of the model
  
      Returns:
          torch.Tensor: The output of the model with sigmoid scaling applied
      """
      if (self.hparams.task == "regression") and (
          self.hparams.target_range is not None
      ):
          for i in range(self.hparams.output_dim):
              y_min, y_max = self.hparams.target_range[i]
              y_hat[:, i] = y_min + nn.Sigmoid()(y_hat[:, i]) * (
                  y_max - y_min
              )
      return y_hat
  
imports: import importlib
  import warnings
  from abc import ABCMeta, abstractmethod
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
  import numpy
  import pytorch_lightning
  import torch
  import torch.nn
  import torchmetrics
  from omegaconf import DictConfig, OmegaConf
  from pandas import DataFrame
  from torch import Tensor
  from torch.optim import Optimizer
  from pytorch_tabular.models.common.heads import blocks
  from pytorch_tabular.models.common.layers import PreEncoded1dLayer
  from pytorch_tabular.utils import get_logger, reset_all_weights
label_desc: Use image node_id 15 for calling the BaseModel obj's underlying member method code with example usage: obj.apply_output_sigmoid_scaling(y_hat) and returns: y_hat