官术网_书友最值得收藏!

Keras

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 libraries
import keras.backend as K
import numpy as np

# Declare the data
A = np.random.rand(20,500)
B = np.random.rand(500,3000)

#Create Variable
x = K.variable(value=A)
y = K.variable(value=B)
z = K.dot(x,y)
print(K.eval(z))
主站蜘蛛池模板: 洞口县| 黎川县| 靖西县| 诸城市| 富源县| 灵丘县| 桑植县| 门源| 绥棱县| 北安市| 会昌县| 江川县| 长治县| 林甸县| 三门县| 周宁县| 陆丰市| 塔城市| 博客| 沁源县| 本溪市| 新建县| 舞阳县| 莱阳市| 黔江区| 宜宾县| 资阳市| 万宁市| 渑池县| 汪清县| 通州区| 思南县| 习水县| 无棣县| 瑞金市| 永清县| 津南区| 江津市| 南靖县| 精河县| 章丘市|