AttributeError: module 'tensorflow.python.summary.summary' has no attribute 'FileWriter'
问题 I'm getting this error, although everywhere I've looked file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph) is mentioned as the correct implementation of this and this. Here is the error: Traceback (most recent call last): File "tfvgg.py", line 304, in writer = tf.summary.FileWriter("/tmp/tfvgg", sess.graph) AttributeError: module 'tensorflow.python.summary.summary' has no attribute 'FileWriter' Here is the code I'm using: # init sess = tf.Session() writer = tf.summary.FileWriter