import tensorflow as tf
input1 = tf.placeholder(tf.float32, [1, 2]) #第一参数:保存类型一般默认float32,
input2 = tf.placeholder(tf.float32, [2, 1]) #第二参数,保存矩阵结构
output1 = tf.matmul(input1, input2)
with tf.Session() as sess:
print(sess.run(output1, feed_dict={input1: [[3.0,3.0]], input2:[[2.0],[2.0]]}))#字典格式给变量赋值tensorflow练习03-placeholder
最新推荐文章于 2022-01-20 14:38:56 发布
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
TensorFlow-v2.15
TensorFlow
TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型
799

被折叠的 条评论
为什么被折叠?



