class_docstr: Layer that computes a matching matrix between samples in two tensors.
  :param normalize: Whether to L2-normalize samples along the
      dot product axis before taking the dot product.
      If set to True, then the output of the dot product
      is the cosine proximity between the two samples.
  :param matching_type: the similarity function for matching
  :param kwargs: Standard layer keyword arguments.
  Examples:
      >>> import delta
      >>> layer = delta.layers.MatchingLayer(matching_type='dot',
      ...                                 normalize=True)
      >>> num_batch, left_len, right_len, num_dim = 5, 3, 2, 10
      >>> layer.build([[num_batch, left_len, num_dim],
      ...              [num_batch, right_len, num_dim]])
class_docstr_tok: ["Layer","that","computes","a","matching","matrix","between","samples","in","two","tensors",".",":","param","normalize",":","Whether","to","L2-normalize","samples","along","the","dot","product","axis","before","taking","the","dot","product",".","If","set","to","True",",","then","the","output","of","the","dot","product","is","the","cosine","proximity","between","the","two","samples",".",":","param","matching_type",":","the","similarity","function","for","matching",":","param","kwargs",":","Standard","layer","keyword","arguments",".","Examples",":",">",">",">","import","delta",">",">",">","layer","=","delta.layers.MatchingLayer","(","matching_type='dot","'",",","...","normalize=True",")",">",">",">","num_batch",",","left_len",",","right_len",",","num_dim","=","5",",","3",",","2",",","10",">",">",">","layer.build","(","[","[","num_batch",",","left_len",",","num_dim","]",",","...","[","num_batch",",","right_len",",","num_dim","]","]",")"]
docstr: :class:`MatchingLayer` constructor.
docstr_tok: [":","class",":","`","MatchingLayer","`","constructor","."]
code: def __init__(
      self,
      normalize: bool = False,
      matching_type: str = "dot",
      **kwargs,
  ):
      """:class:`MatchingLayer` constructor."""
      super().__init__(**kwargs)
      self._normalize = normalize
      self._validate_matching_type(matching_type)
      self._matching_type = matching_type
      self._shape1 = None
      self._shape2 = None
  
file_path: delta/delta/layers/match_pyramid.py
imports: import typing
  import delta.compat
  from delta.layers.base_layer import Layer
label_desc: Use image node_id 1 to create a new MatchingLayer object from inherited base classes: Layer with example: obj = MatchingLayer(normalize, matching_type)