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: Build model structure.
code: def build(self):
      """Build model structure."""
  
      # Scalar dimensions referenced here:
      #   B = batch size (number of sequences)
      #   D = embedding size
      #   L = `input_left` sequence length
      #   R = `input_right` sequence length
      #   K = size of top-k
  
      # Left input and right input.
      # shape = [B, L]
      # shape = [B, R]
      query, doc = self._make_inputs()
  
      embedding = self._make_embedding_layer()
      # Process left input.
      # shape = [B, L, D]
      embed_query = embedding(query)
      # shape = [B, R, D]
      embed_doc = embedding(doc)
      # shape = [B, L]
      atten_mask = tf.not_equal(query, self._params["mask_value"])
      # shape = [B, L]
      atten_mask = tf.cast(atten_mask, keras.backend.floatx())
      # shape = [B, L, 1]
      atten_mask = tf.expand_dims(atten_mask, axis=2)
      # shape = [B, L, 1]
      attention_probs = self.attention_layer(embed_query, atten_mask)
  
      # Matching histogram of top-k
      # shape = [B, L, R]
      matching_matrix = keras.layers.Dot(axes=[2, 2], normalize=True)(
          [embed_query, embed_doc]
      )
      # shape = [B, L, K]
      effective_top_k = min(
          self._params["top_k"],
          self.params["input_shapes"][0][0],
          self.params["input_shapes"][1][0],
      )
      matching_topk = keras.layers.Lambda(
          lambda x: tf.nn.top_k(x, k=effective_top_k, sorted=True)[0]
      )(matching_matrix)
  
      # Process right input.
      # shape = [B, L, 1]
      dense_output = self._make_multi_layer_perceptron_layer()(
          matching_topk
      )
  
      # shape = [B, 1, 1]
      dot_score = keras.layers.Dot(axes=[1, 1])(
          [attention_probs, dense_output]
      )
  
      flatten_score = keras.layers.Flatten()(dot_score)
  
      x_out = self._make_output_layer()(flatten_score)
      self._backend = keras.Model(inputs=[query, doc], outputs=x_out)
  
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 2 for calling the DRMMTKS obj's underlying member method code with example usage: obj.build() without return types