当前位置:网站首页>【MindSpore】用coco2017训练Model_zoo上的 yolov4,迭代了两千多batch_size之后报错,大佬们帮忙看看。
【MindSpore】用coco2017训练Model_zoo上的 yolov4,迭代了两千多batch_size之后报错,大佬们帮忙看看。
2022-07-30 19:04:00 【小乐快乐】
问题描述:
运行环境:Atlas 800 9000 CANN20.2
batch_size: 4,8,16,32(四种分别尝试过,都在一个epoch训练了80%左右报这个错了)
数据集:coco2017
模型:Model_zoo YOLOv4_Cspdarknet53 (配置都是用的默认的)

解决方案:
从错误截图中初步分析的结论是,数据集可能不完整或是有错误,导致一定step之后再也无法迭代出数据进行训练了。
我们建议按照如下方式排查故障:
1、确保coco2017数据集来源正确,mindspore model_zoo中yolo v4 README提供了coco数据集的官方下载链接:COCO - Common Objects in Context
2、上述错误一般源于src/yolo_dataset.py读取coco数据集时发生了错误,建议采用如下方式进行排查:
在src/yolo_dataset.py的代码底部增加如下调试代码:
from src.config import ConfigYOLOV3DarkNet53
if __name__ == '__main__':
config = ConfigYOLOV3DarkNet53()
config.label_smooth = 0
config.label_smooth_factor = 0.1
image_dir = "/your_path/coco2017/train2017"
anno_path = "/your_path/coco2017/annotations/instances_train2017.json"
yolo_dataset = COCOYoloDataset(image_dir, anno_path)
nums = 0
for data in yolo_dataset:
nums += 1
print("nums is ", nums)
以上代码主要用于调试COCOYoloDataset,正常情况下,yolo_dataset是可以正确完整输出所有数据的,请参照以上调试代码,确保读取coco数据集完整无误。
边栏推荐
猜你喜欢

Does the satellite phone communicate directly with the satellite or through a ground station?

WeChat Mini Program Cloud Development | Urban Information Management

6块钱1斤,日本公司为何来中国收烟头?

Fixed asset visualization intelligent management system

Google's AlphaFold claims to have predicted almost every protein structure on Earth
![【Prometheus】Prometheus联邦的一次优化记录[续]](/img/5d/56e171b7a02584337a0cfe5c731fb2.png)
【Prometheus】Prometheus联邦的一次优化记录[续]

scrapy基本使用

NXP IMX8QXP replacement DDR model operation process

【Pointing to Offer】Pointing to Offer 18. Delete the node of the linked list

The use of @ symbol in MySql
随机推荐
监听开机广播
【hbuilder】运行不了部分项目 , 打开终端 无法输入指令
Difference between Object and Map
Basic use of scrapy
阿里云武林头条活动分享
Deepen school-enterprise cooperation and build an "overpass" for the growth of technical and skilled talents
Spark学习:用spark实现ETL
How do radio waves transmit information?
《痞子衡嵌入式半月刊》 第 59 期
AI Basics: Graphical Transformer
浅聊对比学习(Contrastive Learning)第一弹
Scala学习:breakable
The Meta metaverse division lost 2.8 billion in the second quarter!Still want to keep betting?Metaverse development has yet to see a way out!
什么是 RESTful API?
【Pointing to Offer】Pointing to Offer 22. The kth node from the bottom in the linked list
ctf.show_web5
云数据库和本地数据库有什么区别?
SwiftUI iOS 精品开源项目之 完整烘焙食品菜谱App基于SQLite(教程含源码)
Another company interview
What is the value of biomedical papers? How to translate the papers into Chinese and English?