class_docstr: Takes in pre-encoded categorical variables and just concatenates with continuous variables No learnable
  component.
class_docstr_tok: ["Takes","in","pre-encoded","categorical","variables","and","just","concatenates","with","continuous","variables","No","learnable","component","."]
code: def forward(self, x: Dict[str, Any]) -> torch.Tensor:
      assert (
          "continuous" in x or "categorical" in x
      ), "x must contain either continuous and categorical features"
      # (B, N)
      continuous_data, categorical_data = x.get(
          "continuous", torch.empty(0, 0)
      ), x.get("categorical", torch.empty(0, 0))
      assert (
          categorical_data.shape[1] == self.categorical_dim
      ), "categorical_data must have same number of columns as categorical embedding layers"
      assert (
          continuous_data.shape[1] == self.continuous_dim
      ), "continuous_data must have same number of columns as continuous dim"
      embed = None
      if continuous_data.shape[1] > 0:
          if self.batch_norm_continuous_input:
              embed = self.normalizing_batch_norm(continuous_data)
          else:
              embed = continuous_data
          # (B, N, C)
      if categorical_data.shape[1] > 0:
          # (B, N, C)
          if embed is None:
              embed = categorical_data
          else:
              embed = torch.cat([embed, categorical_data], dim=1)
      if self.embd_dropout is not None:
          embed = self.embd_dropout(embed)
      return embed
  
imports: import math
  from functools import partial
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  from torch import nn
  from pytorch_tabular.models.common.layers.batch_norm import BatchNorm1d
  from pytorch_tabular.utils import _initialize_kaiming
label_desc: Use image node_id 2 for calling the PreEncoded1dLayer obj's underlying member method code with example usage: obj.forward(x) and returns: embed