随笔分类 -  tensorflow基础操作

摘要:tf.session对象是执行Operation运算的一个封装环境。Tensor对象会在此执行。 比如: 1 # Build a graph. 2 a = tf.constant(5.0) 3 b = tf.constant(6.0) 4 c = a * b 5 6 # Launch the gra 阅读全文
posted @ 2020-12-19 16:43 hi_mxd 阅读(1030) 评论(0) 推荐(0)
摘要:这个方法用于声明一个需要被填充的张量; 1 tf.compat.v1.placeholder( 2 dtype, shape=None, name=None 3 ) 重点:这个张量如果直接调用的话会产生错误,必须使用feed_dict可选参数将其值提供给Session.run()、Tensor.ev 阅读全文
posted @ 2020-12-19 15:41 hi_mxd 阅读(1708) 评论(0) 推荐(0)