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

Class Dot

Layer that computes a dot product between samples in two tensors.

Aliases:

E.g. if applied to a list of two tensors a and b of shape (batch_size, n), the output will be a tensor of shape (batch_size, 1) where each entry i will be the dot product between a[i] and b[i].

Arguments:

  • 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.

__init__

View source

__init__(
    axes,
    normalize=False,
    **kwargs
)