0. 小试牛刀 首先,激活tensorflow环境( source activate tensorflow ),随后在ipython里: import tensorflow as tf sess = tf.Session() 创建常量格式如下: tf.constant(value, dtype=None, shape=None, name='Const', verify_shape=False) 例1: node1 = tf.constant(3.0, dtype=tf.float32) nod…