class_docstr: DRMMTKS Model.
  
  Examples:
      >>> model = DRMMTKS()
      >>> model.params['embedding_input_dim'] = 10000
      >>> model.params['embedding_output_dim'] = 100
      >>> model.params['top_k'] = 20
      >>> model.params['mlp_num_layers'] = 1
      >>> model.params['mlp_num_units'] = 5
      >>> model.params['mlp_num_fan_out'] = 1
      >>> model.params['mlp_activation_func'] = 'tanh'
      >>> model.guess_and_fill_missing_params(verbose=0)
      >>> model.build()
docstr: Performs attention on the input.
  
  :param attention_input: The input tensor for attention layer.
  :param attention_mask: A tensor to mask the invalid values.
  :return: The masked output tensor.
code: def attention_layer(
      cls,
      attention_input: typing.Any,
      attention_mask: typing.Any = None,
  ) -> keras.layers.Layer:
      """
      Performs attention on the input.
  
      :param attention_input: The input tensor for attention layer.
      :param attention_mask: A tensor to mask the invalid values.
      :return: The masked output tensor.
      """
      # shape = [B, L, 1]
      dense_input = keras.layers.Dense(1, use_bias=False)(
          attention_input
      )
      if attention_mask is not None:
          # Since attention_mask is 1.0 for positions we want to attend and
          # 0.0 for masked positions, this operation will create a tensor
          # which is 0.0 for positions we want to attend and -10000.0 for
          # masked positions.
  
          # shape = [B, L, 1]
          dense_input = keras.layers.Lambda(
              lambda x: x + (1.0 - attention_mask) * -10000.0,
              name="attention_mask",
          )(dense_input)
      # shape = [B, L, 1]
      attention_probs = keras.layers.Lambda(
          lambda x: tf.nn.softmax(x, axis=1),
          output_shape=lambda s: (s[0], s[1], s[2]),
          name="attention_probs",
      )(dense_input)
      return attention_probs
  
file_path: MatchZoo/matchzoo/models/drmmtks.py
imports: import typing
  import keras
  import tensorflow
  from matchzoo.engine.base_model import BaseModel
  from matchzoo.engine.param import Param
  from matchzoo.engine.param_table import ParamTable
  from matchzoo.engine import hyper_spaces
label_desc: Use image node_id 3 for calling the DRMMTKS obj's underlying member method code with example usage: obj.attention_layer(cls, attention_input, attention_mask) and returns: attention_probs