Updated the description of K.dot https://github.com/tensorflow/tensorflow/issues/43653
PiperOrigin-RevId: 335137025 Change-Id: I16261cab89a9fe7f61660ef2fe16b7322eb061e9
This commit is contained in:
parent
b2503c6a5e
commit
3b0672c24b
@ -1817,6 +1817,8 @@ def moving_average_update(x, value, momentum):
|
||||
def dot(x, y):
|
||||
"""Multiplies 2 tensors (and/or variables) and returns a tensor.
|
||||
|
||||
This operation corresponds to `numpy.dot(a, b, out=None)`.
|
||||
|
||||
Arguments:
|
||||
x: Tensor or variable.
|
||||
y: Tensor or variable.
|
||||
@ -1826,6 +1828,7 @@ def dot(x, y):
|
||||
|
||||
Examples:
|
||||
|
||||
If inputs `x` and `y` are 2-D arrays, then it is equivalent to `tf.matmul`.
|
||||
>>> x = tf.keras.backend.placeholder(shape=(2, 3))
|
||||
>>> y = tf.keras.backend.placeholder(shape=(3, 4))
|
||||
>>> xy = tf.keras.backend.dot(x, y)
|
||||
@ -1838,6 +1841,8 @@ def dot(x, y):
|
||||
>>> xy
|
||||
<KerasTensor: shape=(32, 28, 4) dtype=float32 ...>
|
||||
|
||||
If `x` is an N-D array and `y` is an M-D array (where M>=2), it is a sum
|
||||
product over the last axis of `x` and the second-to-last axis of `y`.
|
||||
>>> x = tf.keras.backend.random_uniform_variable(shape=(2, 3), low=0, high=1)
|
||||
>>> y = tf.keras.backend.ones((4, 3, 5))
|
||||
>>> xy = tf.keras.backend.dot(x, y)
|
||||
|
Loading…
x
Reference in New Issue
Block a user