tf.keras.layers.Multiply

Layer that multiplies (element-wise) a list of inputs.

Inherits From: Layer, Module

It takes as input a list of tensors, all of the same shape, and returns a single tensor (also of the same shape).

tf.keras.layers.Multiply()([np.arange(5).reshape(5, 1),
                            np.arange(5, 10).reshape(5, 1)])
<tf.Tensor: shape=(5, 1), dtype=int64, numpy=
array([[ 0],
     [ 6],
     [14],
     [24],
     [36]])>
x1 = tf.keras.layers.Dense(8)(np.