📜  keras 后端矩阵乘法 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:19.832000             🧑  作者: Mango

代码示例1
import keras.backend as K
import numpy as np
A = np.random.rand(10,500)
B = np.random.rand(500,6000)

x = K.variable(value=A)
y = K.variable(value=B)

z = K.dot(x,y)

# Here you need to use K.eval() instead of z.eval() because this uses the backend session
K.eval(z)