
tensorflow
程序媛苹酱
这个作者很懒,什么都没留下…
展开
-
tensorflow学习中的问题(二)
1、feed_dict传数据上代码学编程,最好从代码中学习,这样才可以学以致用先说明一下下面代码要说明什么问题:①feed_dict并不是只能改变用占位符设置的变量(不了解占位符,可以看我之前的文章),可以给任意计算图中的量传值,即使申明为tf.constant的变量也可以传值。②第三个输出是11*6,更加说明每次run的时候都是走计算图的过程import tensorflow as tfdef model(a,b): c = tf.add(a,b) return cdef原创 2021-04-06 21:21:19 · 906 阅读 · 1 评论 -
tensorflow学习(一),计算图
tensorflow使用时的问题,计算图()计算图在调用时才有def add(): #如果仅在 a1 = tf.placeholder(tf.float32) b1 = tf.placeholder(tf.float32) c = tf.add(a1,b1) return cdef main(_): a = tf.constant(5) b = tf.constant(3) c = add(a,b) #在执行add这个函原创 2021-03-29 12:11:44 · 177 阅读 · 0 评论