由于 TensorFlow版本差异,经常会报模块对象没有某属性的错误,先把tensorboard可视化过程遇到的几个报错解决方案记录如下:
1. AttributeError: ‘module‘ object has no attribute ‘histogram_summary‘
histogram_summary 改为:tf.summary.histogram
2. AttributeError: ‘module‘ object has no attribute ‘scalar_summary‘
tf.scalar_summary 改为:tf.summary.scalar
3.AttributeError: ‘module‘ object has no attribute ‘merge_all_summaries‘
tf.merge_all_summaries() 改为:tf.summary.merge_all()
时间: 2024-12-19 19:44:05