Tensorflow error: attributeerror: module ‘tensorflow_ API. V1. Train ‘has no attribute’ summarywriter ‘

TensorFlow Error: AttributeError: module ‘tensorflow._api.v1.train’ has no attribute ‘SummaryWriter’ etc.
Analysis: Version update, method call method change
Solution.

Error oRIGINAL METHOD NEW METHOD
AttributeError: module ‘tensorflow._api.v1.train’ has no attribute ‘SummaryWriter’ tf.train.SummaryWriter() tf.summary.FileWriter()
AttributeError: module ‘tensorflow’ has no attribute ‘merge_all_summaries’ tf.merge_all_summaries() tf.summary.merge_all()
AttributeError: module ‘tensorflow’ has no attribute ‘histogram_summary’ tf.histogram_summary() tf.summary.histogram()
AttributeError: module ‘tensorflow’ has no attribute ‘scalar_summary’ tf.scalar_summary() tf.summary.scalar()
AttributeError: module ‘tensorflow’ has no attribute ‘image_summary’ tf.image_summary() tf.summary.image()
AttributeError: module ‘tensorflow’ has no attribute ‘audio_summary tf.audio_summary() tf.summary.audio()
AttributeError: module ‘tensorflow’ has no attribute ‘merge_summary’ tf.merge_summary() tf.summary.merge()

 

Read More: