class_docstr: Creates a feature embedding for the static categorical features.
class_docstr_tok: ["Creates","a","feature","embedding","for","the","static","categorical","features","."]
code: def __init__(
      self,
      cardinalities: List[int],
      embedding_dimensions: List[int],
  ):
      super().__init__()
  
      assert (
          len(cardinalities) > 0
      ), "Length of `cardinalities` list must be greater than zero"
      assert len(cardinalities) == len(
          embedding_dimensions
      ), "Length of `embedding_dims` and `embedding_dims` should match"
      assert all(
          [c > 0 for c in cardinalities]
      ), "Elements of `cardinalities` should be > 0"
      assert all(
          [d > 0 for d in embedding_dimensions]
      ), "Elements of `embedding_dims` should be > 0"
  
      self.embedders = [
          torch.nn.Embedding(num_embeddings=card, embedding_dim=dim)
          for card, dim in zip(cardinalities, embedding_dimensions)
      ]
      for embedder in self.embedders:
          embedder.apply(init_weights)
  
imports: from functools import partial
  from typing import Optional, Callable, List, Union
  import torch
  from torch import nn
  from torch.distributions import Categorical, MixtureSameFamily, Normal
  from gluonts.core.component import validated
  from gluonts.torch.distributions import DiscreteDistribution
  from .scaling import min_max_scaling, standard_normal_scaling
label_desc: Use image node_id 1 to create a new FeatureEmbedder object from inherited base classes: nn with example: obj = FeatureEmbedder(cardinalities, embedding_dimensions)