class_docstr: Transformer model for text classification
class_docstr_tok: ["Transformer","model","for","text","classification"]
code: def call(self, inputs, training=None, mask=None):
      input_x = inputs["input_x"]
      if self.use_dense_task:
          dense_input = inputs["input_dense"]
  
      enc_mask = self.mask_layer(input_x)
      emb = self.embed(input_x)
      pos_emb = self.pos_embed(emb)
      emb = tf.keras.layers.add([emb, pos_emb])
      enc_emb = self.embed_d(emb, training=training)
  
      enc_out = self.encoder(enc_emb, training=training, mask=enc_mask)
  
      out = self.pool(enc_out)
  
      if self.use_dense_input:
          dense_out = self.dense_input_linear(dense_input)
          if self.only_dense_input:
              out = dense_out
          else:
              out = tf.keras.layers.Concatenate()([out, dense_out])
  
      scores = self.final_dense(out)
      return scores
  
imports: import pickle
  import delta.compat
  from absl import logging
  from delta import layers
  from delta.models.text_cls_model import TextClassModel
  from delta.utils.register import registers
  from delta import utils
label_desc: Use image node_id 2 for calling the TransformerModel obj's underlying member method code with example usage: obj.call(inputs, training, mask) and returns: scores