code: def __init__(
      self,
      context_dims,
      context_embed,
      context_hidden_size,
      context_num_heads,
      context_transformer_dropout,
      context_pooling_dropout,
      cross_size,
      prefix=None,
      params=None,
      **kwargs,
  ):
      super(ContextTransformer, self).__init__(**kwargs)
      # super().__init__(prefix=prefix, params=params)
      self.context_dims = context_dims
      self.context_embed = context_embed
      self.cross_size = cross_size
      with self.name_scope():
          self.context_pooling_dp = MeanMaxPooling(
              dropout=context_pooling_dropout
          )
          self.context_encoder = TransformerEncoderCell(
              units=context_embed,
              hidden_size=context_hidden_size,
              num_heads=context_num_heads,
              dropout=context_transformer_dropout,
          )
          self.dense = gluon.nn.Dense(self.cross_size)
          self.embeddings = gluon.nn.HybridSequential()
          for i, context_dim in enumerate(self.context_dims):
              self.embeddings.add(
                  gluon.nn.Embedding(
                      self.context_dims[i], self.context_embed
                  )
              )
  
file_path: analytics-zoo/pyzoo/zoo/models/recommendation/txt.py
imports: from mxnet import gluon
  from gluonnlp.model.transformer import TransformerEncoder, TransformerEncoderCell
label_desc: Use image node_id 1 to create a new ContextTransformer object from inherited base classes: gluon.nn with example: obj = ContextTransformer(context_dims, context_embed, context_hidden_size, context_num_heads, context_transformer_dropout, context_pooling_dropout, cross_size, prefix, params)