tf.placeholder

来源:互联网 发布:matlab软件官网 编辑:程序博客网 时间:2024/05/21 17:52
#!/usr/bin/env python# -*- coding: utf-8 -*-# @Date    : 2017-11-30 20:22:37# @Author  : Lebhoryi@gmail.com# @Link    : https://morvanzhou.github.io/tutorials/machine-learning/tensorflow/2-5-placeholde/# @Version : Placeholder 传入值import tensorflow as tfinput1 = 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.]}))
原创粉丝点击