AttributeError: module 'tensorflow.tools.api.generator.api.train' has no attribute 'SummaryWriter'

 summary_writer = tf.train.SummaryWriter('/tmp/lstm_logs',session.graph)

改为:

summary_writer = tf.summary.FileWriter('/tmp/lstm_logs',session.graph)

你可能感兴趣的:(TensorFlow)