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

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))
主站蜘蛛池模板: 正宁县| 兴安盟| 醴陵市| 琼海市| 肥乡县| 祁阳县| 吉首市| 章丘市| 铜鼓县| 衡东县| 拜泉县| 伊吾县| 师宗县| 财经| 博白县| 利辛县| 萨迦县| 双城市| 桦南县| 五台县| 镇坪县| 西安市| 沂南县| 东宁县| 项城市| 祁连县| 舞钢市| 璧山县| 准格尔旗| 安陆市| 邓州市| 垦利县| 正安县| 柘荣县| 平乐县| 景泰县| 盖州市| 大名县| 甘谷县| 六盘水市| 麻阳|