class_docstr: MatchPyramid Model.
  
  Examples:
      >>> model = MatchPyramid()
      >>> model.params['embedding_output_dim'] = 300
      >>> model.params['num_blocks'] = 2
      >>> model.params['kernel_count'] = [16, 32]
      >>> model.params['kernel_size'] = [[3, 3], [3, 3]]
      >>> model.params['dpool_size'] = [3, 10]
      >>> model.guess_and_fill_missing_params(verbose=0)
      >>> model.build()
docstr: Build model structure.
  
  MatchPyramid text matching as image recognition.
code: def build(self):
      """
      Build model structure.
  
      MatchPyramid text matching as image recognition.
      """
      input_left, input_right = self._make_inputs()
      input_dpool_index = keras.layers.Input(
          name="dpool_index",
          shape=[
              self._params["input_shapes"][0][0],
              self._params["input_shapes"][1][0],
              2,
          ],
          dtype="int32",
      )
  
      embedding = self._make_embedding_layer()
      embed_left = embedding(input_left)
      embed_right = embedding(input_right)
  
      # Interaction
      matching_layer = matchzoo.layers.MatchingLayer(
          matching_type="dot"
      )
      embed_cross = matching_layer([embed_left, embed_right])
  
      for i in range(self._params["num_blocks"]):
          embed_cross = self._conv_block(
              embed_cross,
              self._params["kernel_count"][i],
              self._params["kernel_size"][i],
              self._params["padding"],
              self._params["activation"],
          )
  
      # Dynamic Pooling
      dpool_layer = matchzoo.layers.DynamicPoolingLayer(
          *self._params["dpool_size"]
      )
      embed_pool = dpool_layer([embed_cross, input_dpool_index])
  
      embed_flat = keras.layers.Flatten()(embed_pool)
      x = keras.layers.Dropout(rate=self._params["dropout_rate"])(
          embed_flat
      )
  
      inputs = [input_left, input_right, input_dpool_index]
      x_out = self._make_output_layer()(x)
      self._backend = keras.Model(inputs=inputs, outputs=x_out)
  
file_path: MatchZoo/matchzoo/models/match_pyramid.py
imports: import typing
  import keras
  import matchzoo
  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 MatchPyramid obj's underlying member method code with example usage: obj.build() without return types