tensorflow-解決AttributeError: module 'tensorflow' has no attribute 'mul'問題

原因:TensorFlow 發布的新版本的API 修改了


tf.mul, tf.sub and tf.neg are deprecated in favor of tf.multiply, tf.subtract and tf.negative.


解決方法:使用時將  tf.mul改成  tf.multiply即可
其餘的  tf.sub和tf.neg也要相應修改為  tf.subtract和tf.negative。

留言

這個網誌中的熱門文章

c語言-關於#define用法

CMD常用網管指令

PHP 與 JavaScript 之間傳值利用 json