class_docstr: y_range: Used specifically for regression. = None for classification.
class_docstr_tok: ["y_range",":","Used","specifically","for","regression",".","=","None","for","classification","."]
code: def forward(self, data_batch):
      input_data = []
      input_offset = 0
      if self.has_vector_features:
          input_data.append(data_batch[0].to(self.device))
          input_offset += 1
      if self.has_embed_features:
          embed_data = data_batch[input_offset]
          for i in range(len(self.embed_blocks)):
              input_data.append(
                  self.embed_blocks[i](embed_data[i].to(self.device))
              )
  
      if len(input_data) > 1:
          input_data = torch.cat(input_data, dim=1)
      else:
          input_data = input_data[0]
  
      output_data = self.main_block(input_data)
      if self.problem_type in [
          REGRESSION,
          QUANTILE,
      ]:  # output with y-range
          if self.y_constraint is None:
              return output_data
          else:
              if self.y_constraint == "nonnegative":
                  return self.y_lower + torch.abs(output_data)
              elif self.y_constraint == "nonpositive":
                  return self.y_upper - torch.abs(output_data)
              else:
                  return (
                      torch.sigmoid(output_data) * self.y_span
                      + self.y_lower
                  )
      elif self.problem_type == SOFTCLASS:
          return self.log_softmax(
              output_data
          )  # KLDivLoss takes in log-probabilities as predictions.
      else:
          return output_data
  
file_path: autogluon/tabular/src/autogluon/tabular/models/tabular_nn/torch/torch_network_modules.py
imports: import logging
  import numpy
  import torch
  import torch.nn
  from autogluon.core.constants import BINARY, MULTICLASS, QUANTILE, REGRESSION, SOFTCLASS
  from ..utils.nn_architecture_utils import get_embed_sizes
label_desc: Use image node_id 4 for calling the EmbedNet obj's underlying member method code with example usage: obj.forward(data_batch) and returns: output_data, self, output_data, unknown, unknown, unknown