class_docstr: Feature tokenizer for categorical features in tabular data.
  It transforms the input categorical features to tokens (embeddings).
  
  The categorical features usually refers to discrete features.
class_docstr_tok: ["Feature","tokenizer","for","categorical","features","in","tabular","data",".","It","transforms","the","input","categorical","features","to","tokens","(","embeddings",")",".","The","categorical","features","usually","refers","to","discrete","features","."]
docstr: Parameters
  ----------
  num_categories:
      A list of integers. Each one is the number of categories in one categorical column.
  d_token:
      The size of one token.
  bias:
      If `True`, for each feature, an additional trainable vector will be added to the
      embedding regardless of feature value. Notablly, the bias are not shared between features.
  initialization:
      Initialization policy for parameters. Must be one of `['uniform', 'normal']`.
  
  References
  ----------
  1. Yury Gorishniy, Ivan Rubachev, Valentin Khrulkov, Artem Babenko,
  "Revisiting Deep Learning Models for Tabular Data", 2021
  https://arxiv.org/pdf/2106.11959.pdf
  2. Code: https://github.com/Yura52/tabular-dl-revisiting-models
code: def __init__(
      self,
      num_categories: List[int],
      d_token: int,
      bias: Optional[bool] = True,
      initialization: Optional[str] = "normal",
  ) -> None:
      """
      Parameters
      ----------
      num_categories:
          A list of integers. Each one is the number of categories in one categorical column.
      d_token:
          The size of one token.
      bias:
          If `True`, for each feature, an additional trainable vector will be added to the
          embedding regardless of feature value. Notablly, the bias are not shared between features.
      initialization:
          Initialization policy for parameters. Must be one of `['uniform', 'normal']`.
  
      References
      ----------
      1. Yury Gorishniy, Ivan Rubachev, Valentin Khrulkov, Artem Babenko,
      "Revisiting Deep Learning Models for Tabular Data", 2021
      https://arxiv.org/pdf/2106.11959.pdf
      2. Code: https://github.com/Yura52/tabular-dl-revisiting-models
      """
      super().__init__()
  
      self.num_categories = num_categories
      category_offsets = torch.tensor([0] + num_categories[:-1]).cumsum(
          0
      )
  
      self.register_buffer(
          "category_offsets", category_offsets, persistent=False
      )
      self.embeddings = nn.Embedding(sum(num_categories), d_token)
      self.bias = (
          nn.Parameter(Tensor(len(num_categories), d_token))
          if bias
          else None
      )
      initialization_ = _TokenInitialization.from_str(initialization)
  
      for parameter in [self.embeddings.weight, self.bias]:
          if parameter is not None:
              initialization_.apply(parameter, d_token)
  
imports: from typing import List, Optional
  import torch
  from torch import Tensor, nn
  from ..constants import CATEGORICAL, FEATURES, LABEL, LOGITS, NUMERICAL
  from .custom_transformer import CLSToken, Custom_Transformer, _TokenInitialization
  from .utils import init_weights
label_desc: Use image node_id 1 to create a new CategoricalFeatureTokenizer object from inherited base classes: nn with example: obj = CategoricalFeatureTokenizer(num_categories, d_token, bias, initialization)