code: def __init__(
      self,
      num_items,
      context_dims,
      item_embed=100,
      context_embed=100,
      item_hidden_size=256,
      item_max_length=8,
      item_num_heads=4,
      item_num_layers=2,
      item_transformer_dropout=0.0,
      item_pooling_dropout=0.1,
      context_hidden_size=256,
      context_num_heads=2,
      context_transformer_dropout=0.0,
      context_pooling_dropout=0.0,
      act_type="gelu",
      cross_size=100,
      prefix=None,
      params=None,
      **kwargs,
  ):
      super(TxT, self).__init__(**kwargs)
      self.act_type = act_type
      with self.name_scope():
          self.sequence_transformer = SequenceTransformer(
              num_items=num_items,
              item_embed=item_embed,
              item_hidden_size=item_hidden_size,
              item_max_length=item_max_length,
              item_num_heads=item_num_heads,
              item_num_layers=item_num_layers,
              item_transformer_dropout=item_transformer_dropout,
              item_pooling_dropout=item_pooling_dropout,
              cross_size=cross_size,
              prefix=prefix,
              params=params,
          )
          self.context_transformer = ContextTransformer(
              context_dims=context_dims,
              context_embed=context_embed,
              context_hidden_size=context_hidden_size,
              context_num_heads=context_num_heads,
              context_transformer_dropout=context_transformer_dropout,
              context_pooling_dropout=context_pooling_dropout,
              cross_size=cross_size,
              prefix=prefix,
              params=params,
          )
          self.dense1 = gluon.nn.Dense(units=num_items // 2)
          if act_type == "relu":
              self.act = gluon.nn.Activation(activation="relu")
          elif act_type == "gelu":
              self.act = gluon.nn.GELU()
          elif act_type == "leakyRelu":
              self.act = gluon.nn.LeakyReLU(alpha=0.2)
          else:
              raise NotImplementedError
          self.dense2 = gluon.nn.Dense(units=num_items, activation=None)
  
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 TxT object from inherited base classes: gluon.nn with example: obj = TxT(num_items, context_dims, item_embed, context_embed, item_hidden_size, item_max_length, item_num_heads, item_num_layers, item_transformer_dropout, item_pooling_dropout, context_hidden_size, context_num_heads, context_transformer_dropout, context_pooling_dropout, act_type, cross_size, prefix, params)