在学习tensorflow的时候,照到官方的例子做,发现了一个 Traceback (most recent call last): File , in <module> sub = tf.sub(x,a) AttributeError: module 'tensorflow' has no attribute 'sub' 一猜,我就估计是函数换名字了,果然,换成了subtract 这样就坑过了 # -*- coding: utf-8 -*- import tensorflow as tf s…