训练暗网立即完成 [英] Training darknet finishes immediately

查看:17
本文介绍了训练暗网立即完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 yolo 架构进行对象检测.在用我的自定义数据训练网络之前,我按照以下步骤在 Pascal VOC 数据上训练它:https://pjreddie.com/darknet/yolo/

I would like to use the yolo architecture for object detection. Before training the network with my custom data, I followed these steps to train it on the Pascal VOC data: https://pjreddie.com/darknet/yolo/

说明很清楚.但是在最后一步之后

The instructions are very clear. But after the final step

./darknet 检测器 train cfg/voc.data cfg/yolo-voc.cfg darknet19_448.conv.23

darknet 立即停止训练并宣布权重已写入 backups/ 目录.

darknet immediately stops training and announces that weights have been written to the backups/ directory.

一开始我觉得预训练简直太好了,马上就能达到停止标准.因此,我在其中一张测试图像 data/dog 上使用了带有这些权重的 ./darknet detect 命令.什么也没找到.

At first I thought that the pretraining was simply too good and that the stopping criteria would be reached at once. So I've used the ./darknet detect command with these weights on one of the test images data/dog. Nothing is found.

如果我不使用任何预训练权重,网络会进行训练.我已经编辑了 cfg/yolo-voc.cfg 来使用

If I don't use any pretrained weights, the network does train. I've edited cfg/yolo-voc.cfg to use

# Testing
#batch=1
#subdivisions=1
# Training
batch=32
subdivisions=8

现在训练过程已经运行了好几个小时,让我的 GPU 保持温暖.

Now the training process has been runnning for many hours and is keeping my gpu warm.

这是训练暗网的预期方式吗?如何正确使用预训练权重,而无需训练中断?

Is this the intended way to train darknet ? How can I use pretrained weights correctly, without training just breaking off ?

是否有任何设置可以创建检查点或了解进度?

Is there any setting to create checkpoints, or get an idea of the progress ?

推荐答案

这是一个老问题,所以我希望你现在已经有了答案,但这里是我的,以防万一.

This is an old question so I hope you have your answer by now, but here is mine just in case it helps.

在暗网工作大约一个月后,我遇到了人们在论坛上询问/发布的大部分障碍.在你的情况下,我很确定这是因为权重已经针对最大批次数进行了训练,并且当在暗网中读取预训练的权重时,假设训练已经完成.

After working with darknet for about a month, I've run into most of the roadblocks that people have asked/posted about on forums. In your case, I'm pretty certain it's because the weights have been trained for the max number of batches already, and when the pre-trained weights were read in darknet assumed training was done.

相关个人经验:当我使用其中一个pretrained weights文件时,它从迭代40101开始,一直运行到40200才切断.

Relevant personal experience: when I used one of the pretrained weights files, it started from iteration 40101 and ran until 40200 before cutting off.

如果您有自定义数据,我会坚持从头开始训练,但如果您想再次尝试预训练的权重,您可能会发现更改 cfg 文件中的最大批次会有所帮助.

I would stick to training from scratch if you have custom data, but if you want to try the pre-trained weights again, you might find that changing max batches in the cfg file helps.

这篇关于训练暗网立即完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆