Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yolov5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
yolov5
Commits
f1096b2c
提交
f1096b2c
authored
8月 02, 2020
作者:
Glenn Jocher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hyperparameter evolution update (#566)
上级
305c6a02
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
+4
-3
train.py
train.py
+4
-3
没有找到文件。
train.py
浏览文件 @
f1096b2c
...
@@ -213,6 +213,7 @@ def train(hyp, opt, device, tb_writer=None):
...
@@ -213,6 +213,7 @@ def train(hyp, opt, device, tb_writer=None):
# Start training
# Start training
t0
=
time
.
time
()
t0
=
time
.
time
()
nw
=
max
(
3
*
nb
,
1e3
)
# number of warmup iterations, max(3 epochs, 1k iterations)
nw
=
max
(
3
*
nb
,
1e3
)
# number of warmup iterations, max(3 epochs, 1k iterations)
# nw = min(nw, (epochs - start_epoch) / 2 * nb) # limit warmup to < 1/2 of training
maps
=
np
.
zeros
(
nc
)
# mAP per class
maps
=
np
.
zeros
(
nc
)
# mAP per class
results
=
(
0
,
0
,
0
,
0
,
0
,
0
,
0
)
# 'P', 'R', 'mAP', 'F1', 'val GIoU', 'val Objectness', 'val Classification'
results
=
(
0
,
0
,
0
,
0
,
0
,
0
,
0
)
# 'P', 'R', 'mAP', 'F1', 'val GIoU', 'val Objectness', 'val Classification'
scheduler
.
last_epoch
=
start_epoch
-
1
# do not move
scheduler
.
last_epoch
=
start_epoch
-
1
# do not move
...
@@ -477,8 +478,8 @@ if __name__ == '__main__':
...
@@ -477,8 +478,8 @@ if __name__ == '__main__':
'anchor_t'
:
(
1
,
2.0
,
8.0
),
# anchor-multiple threshold
'anchor_t'
:
(
1
,
2.0
,
8.0
),
# anchor-multiple threshold
'fl_gamma'
:
(
0
,
0.0
,
2.0
),
# focal loss gamma (efficientDet default gamma=1.5)
'fl_gamma'
:
(
0
,
0.0
,
2.0
),
# focal loss gamma (efficientDet default gamma=1.5)
'hsv_h'
:
(
1
,
0.0
,
0.1
),
# image HSV-Hue augmentation (fraction)
'hsv_h'
:
(
1
,
0.0
,
0.1
),
# image HSV-Hue augmentation (fraction)
'hsv_s'
:
(
1
,
0.0
,
0.
8
),
# image HSV-Saturation augmentation (fraction)
'hsv_s'
:
(
1
,
0.0
,
0.
9
),
# image HSV-Saturation augmentation (fraction)
'hsv_v'
:
(
1
,
0.0
,
0.
8
),
# image HSV-Value augmentation (fraction)
'hsv_v'
:
(
1
,
0.0
,
0.
9
),
# image HSV-Value augmentation (fraction)
'degrees'
:
(
1
,
0.0
,
45.0
),
# image rotation (+/- deg)
'degrees'
:
(
1
,
0.0
,
45.0
),
# image rotation (+/- deg)
'translate'
:
(
1
,
0.0
,
0.9
),
# image translation (+/- fraction)
'translate'
:
(
1
,
0.0
,
0.9
),
# image translation (+/- fraction)
'scale'
:
(
1
,
0.0
,
0.9
),
# image scale (+/- gain)
'scale'
:
(
1
,
0.0
,
0.9
),
# image scale (+/- gain)
...
@@ -495,7 +496,7 @@ if __name__ == '__main__':
...
@@ -495,7 +496,7 @@ if __name__ == '__main__':
if
opt
.
bucket
:
if
opt
.
bucket
:
os
.
system
(
'gsutil cp gs://
%
s/evolve.txt .'
%
opt
.
bucket
)
# download evolve.txt if exists
os
.
system
(
'gsutil cp gs://
%
s/evolve.txt .'
%
opt
.
bucket
)
# download evolve.txt if exists
for
_
in
range
(
10
):
# generations to evolve
for
_
in
range
(
10
0
):
# generations to evolve
if
os
.
path
.
exists
(
'evolve.txt'
):
# if evolve.txt exists: select best hyps and mutate
if
os
.
path
.
exists
(
'evolve.txt'
):
# if evolve.txt exists: select best hyps and mutate
# Select parent(s)
# Select parent(s)
parent
=
'single'
# parent selection method: 'single' or 'weighted'
parent
=
'single'
# parent selection method: 'single' or 'weighted'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论