class_docstr: Layer that compute attention for BiMPM model.
  
  For detailed information, see Bilateral Multi-Perspective Matching for
  Natural Language Sentences, section 3.2.
  
  Reference:
  https://github.com/zhiguowang/BiMPM/blob/master/src/layer_utils.py#L145-L196
  
  Examples:
      >>> import matchzoo as mz
      >>> layer = mz.contrib.layers.AttentionLayer(att_dim=50)
      >>> layer.compute_output_shape([(32, 10, 100), (32, 40, 100)])
      (32, 10, 40)
class_docstr_tok: ["Layer","that","compute","attention","for","BiMPM","model",".","For","detailed","information",",","see","Bilateral","Multi-Perspective","Matching","for","Natural","Language","Sentences",",","section","3.2",".","Reference",":","https",":","\/\/github.com\/zhiguowang\/BiMPM\/blob\/master\/src\/layer_utils.py","#","L145-L196","Examples",":",">",">",">","import","matchzoo","as","mz",">",">",">","layer","=","mz.contrib.layers.AttentionLayer","(","att_dim=50",")",">",">",">","layer.compute_output_shape","(","[","(","32",",","10",",","100",")",",","(","32",",","40",",","100",")","]",")","(","32",",","10",",","40",")"]
docstr: class: `AttentionLayer` constructor.
  
  :param att_dim: int
  :param att_type: int
docstr_tok: ["class",":","`","AttentionLayer","`","constructor",".",":","param","att_dim",":","int",":","param","att_type",":","int"]
code: def __init__(
      self,
      att_dim: int,
      att_type: str = "default",
      dropout_rate: float = 0.0,
  ):
      """
      class: `AttentionLayer` constructor.
  
      :param att_dim: int
      :param att_type: int
      """
      super(AttentionLayer, self).__init__()
      self._att_dim = att_dim
      self._att_type = att_type
      self._dropout_rate = dropout_rate
  
file_path: MatchZoo/matchzoo/contrib/layers/attention_layer.py
imports: import tensorflow
  from keras import backend
  from keras.engine import Layer
label_desc: Use image node_id 1 to create a new AttentionLayer object from inherited base classes: Layer with example: obj = AttentionLayer(att_dim, att_type, dropout_rate)