Pytorch-YOLOv3运行中可能遇到的错误

github链接:https://github.com/eriklindernoren/PyTorch-YOLOv3

错误1

File "pytorch_platform/PyTorch-YOLOv3/utils/logger.py", line 7, in __init__
    self.writer = tf.summary.FileWriter(log_dir)
AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'FileWriter'

出现上述错误的原因是我使用的tensorflow版本是2.0版本,其中一些api有改动,解决方法如下:

将    self.writer = tf.summary.FileWriter(log_dir)

改为  self.writer = tf.summary.create_file_writer(log_dir)
发布了38 篇原创文章 · 获赞 8 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/u014090429/article/details/102498615
今日推荐