TensorFlow-placeholder传入值

import tensorflow._api.v2.compat.v1 as tf
tf.disable_v2_behavior()
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

input1 = tf.placeholder(tf.float32)		#定义结构
input2 = tf.placeholder(tf.float32)


output = tf.multiply(input1,input2)		#矩阵相乘

with tf.Session() as sess:
    print(sess.run(output,Feed_dict={input1:[7.],input2:[2.]}))#开始运行

相关文章

MNIST数据集可以说是深度学习的入门,但是使用模型预测单张M...
1、新建tensorflow环境(1)打开anacondaprompt,输入命令行...
这篇文章主要介绍“张量tensor是什么”,在日常操作中,相信...
tensorflow中model.fit()用法model.fit()方法用于执行训练过...
https://blog.csdn.net/To_be_little/article/details/12443...
根据身高推测体重const$=require('jquery');const...