January 2019
Intermediate to advanced
390 pages
9h 16m
English
Keras is a high-level API that runs on top of TensorFlow. It allows for fast and easy prototyping. It supports both convolutional and recurrent neural networks, and even a combination of the two. It can run on both CPUs and GPUs. The following code performs matrix multiplication using Keras:
# Import the librariesimport keras.backend as Kimport numpy as np# Declare the dataA = np.random.rand(20,500)B = np.random.rand(500,3000)#Create Variablex = K.variable(value=A)y = K.variable(value=B)z = K.dot(x,y)print(K.eval(z))
Read now
Unlock full access