class_docstr: Layer that captures the basic interactions between two tensors.
  
  :param channels: Number of word interaction tensor channels
  :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 init_diag: Whether to initialize the diagonal elements
      of the matrix.
  :param kwargs: Standard layer keyword arguments.
  
  Examples:
      >>> import matchzoo as mz
      >>> layer = mz.contrib.layers.MatchingTensorLayer(channels=4,
      ...                                               normalize=True,
      ...                                               init_diag=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:`MatchingTensorLayer` constructor.
code: def __init__(
      self,
      channels: int = 4,
      normalize: bool = True,
      init_diag: bool = True,
      **kwargs,
  ):
      """:class:`MatchingTensorLayer` constructor."""
      super().__init__(**kwargs)
      self._channels = channels
      self._normalize = normalize
      self._init_diag = init_diag
      self._shape1 = None
      self._shape2 = None
  
file_path: MatchZoo/matchzoo/contrib/layers/matching_tensor_layer.py
imports: import typing
  import numpy
  import tensorflow
  from keras import backend
  from keras.engine import Layer
  from keras.initializers import constant
label_desc: Use image node_id 1 to create a new MatchingTensorLayer object from inherited base classes: Layer with example: obj = MatchingTensorLayer(channels, normalize, init_diag)