TensorFlow 初级
代码详见:NoteBook 我的博客:TensorFlow 核心——数据流图 TensorFlow 是基于数据流图 (Data Flow Graph), 支持自动微分 (简称AD) 的数值计算库。本文仅仅考虑低级 API. TensorFlow 的计算图模型一般分为两个步骤:创建计算图,在 Session 中运行。(暂不考虑 Eager) 为了更好的管理模型,最好在特定的 Graph 中创建模型,且对于实现不同功能的模块最好按照 name_scope 对其进行划分。下面是一个 Demo: # Explicitly create a Graph object graph = tf.Graph() with graph.as_default(): with tf.name_scope("variables"): # Variable to keep track of how many times the graph has been run global_step = tf.Variable(0, dtype=tf.int32, name="global_step") # Variable...

