问题遇到的现象和发生背景
试图使用Tensorboard一张图显示多条曲线,结果出现报错:AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'merge_all'
问题相关代码,请勿粘贴截图
运行结果及报错内容
Traceback (most recent call last):
File "C:\Users\shuyf\yolov5\runs\train\exp3\ceshi.py", line 16, in <module>
write_op = tf.summary.merge_all()
AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'merge_all'
我的解答思路和尝试过的方法
尝试改为tf.compat.v1.summary.merge_all(),但是仍然报错。