class_docstr: Layer that computes dynamic pooling of one tensor.
  
  :param psize1: pooling size of dimension 1
  :param psize2: pooling size of dimension 2
  :param kwargs: Standard layer keyword arguments.
  
  Examples:
      >>> import matchzoo as mz
      >>> layer = mz.layers.DynamicPoolingLayer(3, 2)
      >>> num_batch, left_len, right_len, num_dim = 5, 3, 2, 10
      >>> layer.build([[num_batch, left_len, right_len, num_dim],
      ...              [num_batch, left_len, right_len, 3]])
docstr: The computation logic of DynamicPoolingLayer.
  
  :param inputs: two input tensors.
code: def call(self, inputs: list, **kwargs) -> typing.Any:
      """
      The computation logic of DynamicPoolingLayer.
  
      :param inputs: two input tensors.
      """
      self._validate_dpool_size()
      x, dpool_index = inputs
      dpool_shape = tf.shape(dpool_index)
      batch_index_one = tf.expand_dims(
          tf.expand_dims(tf.range(dpool_shape[0]), axis=-1), axis=-1
      )
      batch_index = tf.expand_dims(
          tf.tile(batch_index_one, [1, self._msize1, self._msize2]),
          axis=-1,
      )
      dpool_index_ex = tf.concat([batch_index, dpool_index], axis=3)
      x_expand = tf.gather_nd(x, dpool_index_ex)
      stride1 = self._msize1 // self._psize1
      stride2 = self._msize2 // self._psize2
  
      x_pool = tf.nn.max_pool(
          x_expand,
          [1, stride1, stride2, 1],
          [1, stride1, stride2, 1],
          "VALID",
      )
      return x_pool
  
file_path: MatchZoo/matchzoo/layers/dynamic_pooling_layer.py
imports: import typing
  import tensorflow
  from keras.engine import Layer
label_desc: Use image node_id 3 for calling the DynamicPoolingLayer obj's underlying member method code with example usage: obj.call(inputs) and returns: x_pool