TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.keras.layers.dot

TensorFlow 1 version View source on GitHub

Functional interface to the Dot layer.

Aliases:

  • tf.compat.v1.keras.layers.dot
  • tf.compat.v2.keras.layers.dot
tf.keras.layers.dot(
    inputs,
    axes,
    normalize=False,
    **kwargs
)

Arguments:

  • inputs: A list of input tensors (at least 2).
  • axes: Integer or tuple of integers, axis or axes along which to take the dot product.
  • 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.