容易理解,命令语句基本没有优化,C、Java、C++、python
a = 2 b = 3 c = a * b d = c + 1 print(d)
涉及较多的嵌入和优化,运行速度有同比提升
import tensorflow as tf a = tf.constant(2) b = tf.constant(3) c = tf.multiply(a,b) d = tf.add(c,1) with tf.Session() as sess: print(sess.run(d))
原文:https://www.cnblogs.com/SCCQ/p/12326464.html