tensorflow 图理解 发表于 2018-11-Tue | 阅读次数: 123456import tensorflow as tfa = tf.constant(1, name="a")b = tf.constant(2, name="b")c = a + bprint(tf.get_default_graph().as_graph_def())123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657node { name: "a" op: "Const" attr { key: "dtype" value { type: DT_INT32 } } attr { key: "value" value { tensor { dtype: DT_INT32 tensor_shape { } int_val: 1 } } }}node { name: "b" op: "Const" attr { key: "dtype" value { type: DT_INT32 } } attr { key: "value" value { tensor { dtype: DT_INT32 tensor_shape { } int_val: 2 } } }}node { name: "add" op: "Add" input: "a" input: "b" attr { key: "T" value { type: DT_INT32 } }}versions { producer: 27}请作者喝一杯咖啡☕️打赏微信支付