code: def __init__(
      self,
      feature_dims: List[int],
      embedding_dims: List[int],
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
  
      assert len(feature_dims) > 0, "Expected len(feature_dims) > 1"
      assert len(feature_dims) == len(
          embedding_dims
      ), "Length of `feature_dims` and `embedding_dims` should match"
      assert all(
          c > 0 for c in feature_dims
      ), "Elements of `feature_dims` should be > 0"
      assert all(
          d > 0 for d in embedding_dims
      ), "Elements of `embedding_dims` should be > 0"
  
      self.feature_dims = feature_dims
      self._num_features = len(feature_dims)
  
      self._projectors = nn.ModuleList(
          [
              nn.Linear(out_features=d, in_features=c)
              for c, d in zip(feature_dims, embedding_dims)
          ]
      )
  
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from gluonts.core.component import validated
  from gluonts.torch.modules.feature import FeatureEmbedder
label_desc: Use image node_id 1 to create a new FeatureProjector object from inherited base classes: nn with example: obj = FeatureProjector(feature_dims, embedding_dims)