define tensorflow and run it

 

 

 

import tensorflow as tf

a, b, c, d, e = tf.constant(5, name='input_a'), tf.constant(6, name='input_b'), tf.mul(a, b, name='mul_c'), tf.add(a, b,
                                                                                                                   name='add_d'), tf.add(
    c, d, name='add_e')

sess = tf.Session()
sess.run(e)

sess.close()

u

posted @ 2017-11-02 17:54  papering  阅读(176)  评论(0编辑  收藏  举报