操作步骤见https://m.jb51.net/article/179445.htm (第一次写,不知道能不能这么带链接,如果不可以我会删掉的)
报错1 module ‘tensorflow’ has no attribute ‘random_normal’
说明tensorflow中没有random_normal这个方法。
最新一版的random_normal方法已经换为:random.normal,修改一下即可
报错2 AttributeError: module ‘tensorboard.summary._tf.summary’ has no attribute ‘FileWriter’
在网上找到解决办法:最后发现tensorflow版本的问题,将tf.summary.FileWriter()换成tf.summary.create_file_writer(),解决问题.
报错3 writer.close()
^
SyntaxError: invalid syntax
改成 writer_close()后错误又跳到括号这,虽然知道这是语法问题,但是小白一脸懵逼,不知道该如何处理