class_docstr: Computes element-wise dot product of two tensors.
  
  It takes a list of inputs of size 2, and the axes
  corresponding to each input along with the dot product
  is to be performed.
  
  Let's say `x` and `y` are the two input tensors with shapes
  `(2, 3, 5)` and `(2, 10, 3)`. The batch dimension should be
  of same size for both the inputs, and `axes` should correspond
  to the dimensions that have the same size in the corresponding
  inputs. e.g. with `axes=(1, 2)`, the dot product of `x`, and `y`
  will result in a tensor with shape `(2, 5, 10)`
  
  Examples:
  
  >>> x = np.arange(10).reshape(1, 5, 2)
  >>> y = np.arange(10, 20).reshape(1, 2, 5)
  >>> keras.layers.Dot(axes=(1, 2))([x, y])
  
  Usage in a Keras model:
  
  >>> x1 = keras.layers.Dense(8)(np.arange(10).reshape(5, 2))
  >>> x2 = keras.layers.Dense(8)(np.arange(10, 20).reshape(5, 2))
  >>> y = keras.layers.Dot(axes=1)([x1, x2])
  
  Args:
      axes: Integer or tuple of integers, axis or axes along which to
          take the dot product. If a tuple, should be two integers
          corresponding to the desired axis from the first input and the
          desired axis from the second input, respectively. Note that the
          size of the two selected axes must match.
      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.
      **kwargs: Standard layer keyword arguments.
  
  Returns:
      A tensor, the dot product of the samples from the inputs.
code: def compute_output_shape(self, input_shape):
      if (
          not isinstance(input_shape, (tuple, list))
          or len(input_shape) != 2
      ):
          raise ValueError(
              f"A `Dot` layer should be called on a list of 2 inputs. "
              f"Received: input_shape={input_shape}"
          )
      shape1 = list(input_shape[0])
      shape2 = list(input_shape[1])
      if isinstance(self.axes, int):
          if self.axes < 0:
              axes = [self.axes % len(shape1), self.axes % len(shape2)]
          else:
              axes = [self.axes] * 2
      else:
          axes = self.axes
      shape1.pop(axes[0])
      shape2.pop(axes[1])
      shape2.pop(0)
      output_shape = shape1 + shape2
      if len(output_shape) == 1:
          output_shape += [1]
      return tuple(output_shape)
  
file_path: keras/keras/layers/merging/dot.py
imports: from keras import ops
  from keras.api_export import keras_export
  from keras.layers.merging.base_merge import Merge
  from keras.utils.numerical_utils import normalize
label_desc: Use image node_id 4 for calling the Dot obj's underlying member method code with example usage: obj.compute_output_shape(input_shape) and returns: tuple