class_docstr: A keras implementation of multi-perspective layer of BiMPM.
  
  For detailed information, see Bilateral Multi-Perspective
  Matching for Natural Language Sentences, section 3.2.
  
  Examples:
      >>> import matchzoo as mz
      >>> perspective={'full': True, 'max-pooling': True,
      ...     'attentive': True, 'max-attentive': True}
      >>> layer = mz.contrib.layers.MultiPerspectiveLayer(
      ...     att_dim=50, mp_dim=20, perspective=perspective)
      >>> layer.compute_output_shape(
      ...     [(32, 10, 100), (32, 50), None, (32, 50), None,
      ...     [(32, 40, 100), (32, 50), None, (32, 50), None]])
      (32, 10, 83)
class_docstr_tok: ["A","keras","implementation","of","multi-perspective","layer","of","BiMPM",".","For","detailed","information",",","see","Bilateral","Multi-Perspective","Matching","for","Natural","Language","Sentences",",","section","3.2",".","Examples",":",">",">",">","import","matchzoo","as","mz",">",">",">","perspective=","{","'full","'",":","True",",","'max-pooling","'",":","True",",","...","'attentive","'",":","True",",","'max-attentive","'",":","True","}",">",">",">","layer","=","mz.contrib.layers.MultiPerspectiveLayer","(","...","att_dim=50",",","mp_dim=20",",","perspective=perspective",")",">",">",">","layer.compute_output_shape","(","...","[","(","32",",","10",",","100",")",",","(","32",",","50",")",",","None",",","(","32",",","50",")",",","None",",","...","[","(","32",",","40",",","100",")",",","(","32",",","50",")",",","None",",","(","32",",","50",")",",","None","]","]",")","(","32",",","10",",","83",")"]
docstr: Class initialization.
docstr_tok: ["Class","initialization","."]
code: def __init__(self, att_dim: int, mp_dim: int, perspective: dict):
      """Class initialization."""
      super(MultiPerspectiveLayer, self).__init__()
      self._att_dim = att_dim
      self._mp_dim = mp_dim
      self._perspective = perspective
  
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 1 to create a new MultiPerspectiveLayer object from inherited base classes: Layer with example: obj = MultiPerspectiveLayer(att_dim, mp_dim, perspective)