版權聲明:本文爲博主原創文章,未經博主允許不得轉載。 https://blog.csdn.net/PinkRiverside/article/details/72860178
對着TensorFlow中文社區的教程敲了一部分,最經常出現的錯誤就是
module 'tensorflow' has no attribute 'xxx'
原因是TensorFlow新版本修改了許多函數的名字,不完全整理如下:
tf.sub()
更改爲tf.subtract()
tf.mul()
更改爲tf.multiply()
tf.types.float32
更改爲tf.float32
tf.pact()
更改爲tf.stact()