class_docstr: Embed a sequence of categorical features.
  
  Parameters
  ----------
  cardinalities
      cardinality for each categorical feature.
  
  embedding_dims
      number of dimensions to embed each categorical feature.
  
  dtype
      Data type of the embedded features.
class_docstr_tok: ["Embed","a","sequence","of","categorical","features",".","Parameters","--","--","--","--","--","cardinalities","cardinality","for","each","categorical","feature",".","embedding_dims","number","of","dimensions","to","embed","each","categorical","feature",".","dtype","Data","type","of","the","embedded","features","."]
docstr: Parameters
  ----------
  F
  
  features
      Categorical features with shape: (N,T,C) or (N,C), where C is the
      number of categorical features.
  
  Returns
  -------
  concatenated_tensor: Tensor
      Concatenated tensor of embeddings with shape: (N,T,C) or (N,C),
      where C is the sum of the embedding dimensions for each categorical
      feature, i.e. C = sum(self.config.embedding_dims).
docstr_tok: ["Parameters","--","--","--","--","--","F","features","Categorical","features","with","shape",":","(","N",",","T",",","C",")","or","(","N",",","C",")",",","where","C","is","the","number","of","categorical","features",".","Returns","--","--","--","-","concatenated_tensor",":","Tensor","Concatenated","tensor","of","embeddings","with","shape",":","(","N",",","T",",","C",")","or","(","N",",","C",")",",","where","C","is","the","sum","of","the","embedding","dimensions","for","each","categorical","feature",",","i.e",".","C","=","sum","(","self.config.embedding_dims",")","."]
code: def hybrid_forward(self, F, features: Tensor) -> Tensor:
      """
  
      Parameters
      ----------
      F
  
      features
          Categorical features with shape: (N,T,C) or (N,C), where C is the
          number of categorical features.
  
      Returns
      -------
      concatenated_tensor: Tensor
          Concatenated tensor of embeddings with shape: (N,T,C) or (N,C),
          where C is the sum of the embedding dimensions for each categorical
          feature, i.e. C = sum(self.config.embedding_dims).
      """
  
      if self.__num_features > 1:
          # we slice the last dimension, giving an array of length
          # self.__num_features with shape (N,T) or (N)
          cat_feature_slices = F.split(
              features, axis=-1, num_outputs=self.__num_features
          )
      else:
          # F.split will iterate over the second-to-last axis if the last
          # axis is one
          cat_feature_slices = [features]
  
      return F.concat(
          *[
              embed(F.squeeze(cat_feature_slice, axis=-1))
              for embed, cat_feature_slice in zip(
                  self.__embedders, cat_feature_slices
              )
          ],
          dim=-1,
      )
  
file_path: gluonts/src/gluonts/mx/block/feature.py
imports: from typing import Callable, List, Optional, Type
  import mxnet.gluon.nn
  import numpy
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
label_desc: Use image node_id 2 for calling the FeatureEmbedder obj's underlying member method code with example usage: obj.hybrid_forward(F, features) and returns: F