tf

由于 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()

wKioL1mRVBHwa8IFAAFanaZVfjY003.png-wh_50

wKiom1mRVBLR3RB2AACOCPyaSRI761.png-wh_50

猜你喜欢

转载自blog.csdn.net/qq_33786177/article/details/82942601
tf