November 2017
Intermediate to advanced
274 pages
6h 16m
English
Matrix multiplication of matrices A and B is a third matrix, C:
C = AB
The element-wise product of matrices is called a Hadamard product and is denoted as A.B.
The dot product of two vectors x and y of the same dimensionality is the matrix product x transposing y. Matrix product C = AB is like computing Ci,j as the dot product between row i of matrix A and column j of matrix B:

The following example shows the Hadamard product and dot product using tensor objects:
import tensorflow as tf mat1 = tf.constant([[4, 5, 6],[3,2,1]])mat2 = tf.constant([[7, 8, 9],[10, 11, 12]]) # hadamard product (element wise)mult = tf.multiply(mat1, ...
Read now
Unlock full access