keras backend matrix multiplication

Solutions on MaxInterview for keras backend matrix multiplication by the best coders in the world

showing results for - "keras backend matrix multiplication"
Manuela
26 May 2018
1import keras.backend as K
2import numpy as np
3A = np.random.rand(10,500)
4B = np.random.rand(500,6000)
5
6x = K.variable(value=A)
7y = K.variable(value=B)
8
9z = K.dot(x,y)
10
11# Here you need to use K.eval() instead of z.eval() because this uses the backend session
12K.eval(z)