问题:在跑yolov3实验运行时报错如下:
AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'FileWriter'
解决:
我运行实验使用的tensorlfow2.3.1版本,版本较新。新版本下该方法名替换如下:
# self.writer = tf.summary.FileWriter(log_dir) # 老版tensorflow使用这个方法名
self.writer = tf.summary.create_file_writer(log_dir) # tensorflow2.3.1版本
本文解决了一个在使用TensorFlow 2.3.1版本进行YoloV3实验过程中遇到的问题,即在尝试写入TensorBoard日志时出现的AttributeError。文章详细介绍了错误原因及如何修改代码以适配新版本TensorFlow。
2万+

被折叠的 条评论
为什么被折叠?



