class_docstr: Implementation of Multi-Perspective Cosine Distance.
  
  Reference:
  https://github.com/zhiguowang/BiMPM/blob/master/src/match_utils.py#L121-L129
  
  Examples:
      >>> import matchzoo as mz
      >>> layer = mz.contrib.layers.multi_perspective_layer.MpCosineLayer(
      ...     mp_dim=50)
      >>> layer.compute_output_shape([(32, 10, 100), (32, 10, 100)])
      (32, 10, 50)
class_docstr_tok: ["Implementation","of","Multi-Perspective","Cosine","Distance",".","Reference",":","https",":","\/\/github.com\/zhiguowang\/BiMPM\/blob\/master\/src\/match_utils.py","#","L121-L129","Examples",":",">",">",">","import","matchzoo","as","mz",">",">",">","layer","=","mz.contrib.layers.multi_perspective_layer.MpCosineLayer","(","...","mp_dim=50",")",">",">",">","layer.compute_output_shape","(","[","(","32",",","10",",","100",")",",","(","32",",","10",",","100",")","]",")","(","32",",","10",",","50",")"]
docstr: Call.
docstr_tok: ["Call","."]
code: def call(self, x, **kwargs):
      """Call."""
      v1, v2 = x
      v1 = tf.expand_dims(v1, 2) * self.kernel  # [b, s_lt, m, d]
      v2 = tf.expand_dims(v2, 2)  # [b, s_lt, 1, d]
      return _cosine_distance(v1, v2, False)
  
imports: import tensorflow
  from keras import backend
  from keras.engine import Layer
  from matchzoo.contrib.layers.attention_layer import AttentionLayer
label_desc: Use image node_id 3 for calling the MpCosineLayer obj's underlying member method code with example usage: obj.call(x) and returns: _cosine_distance