[net]
# Testing
# batch=1
# subdivisions=1
# Training
# 每16个样本进行一次参数更新
batch=16
# 将batch分割为2个子batch(内存不够大)
# 降低对显存的占用情况
subdivisions=2
# 图片宽和高
# 只设置成32的倍数(考虑precision)
width=1024
height=1024
# 输入图像的通道数
channels=3
# 动量
# 梯度下降到最优值的速度,建议配置为0.9
momentum=0.9
# 权重衰减正则项(防止过拟合)
# decay参数越大,对过拟合的抑制能力越强
decay=0.0005
# 通过旋转角度来生成更多训练样本
# 如果angle=10,就是生成新图片时随机旋转-10~10度
angle=0
# 调整饱和度
saturation = 1.5
# 调整曝光量
exposure = 1.5
# 调整色调
hue=.1
#初始学习率
learning_rate=0.0001
# 在迭代次数小于burn_in时,其学习率的更新有一种方式
# 大于burn_in时,采用policy的更新方式
burn_in=1000
# 训练达到max_batches后,停止学习
max_batches = 500200
# 调整学习率的policy
# policy:CONSTANT, STEP, EXP, POLY, STEPS, SIG, RANDOM
policy=steps
# 根据batch_num调整学习率
steps=400000,450000
# 学习率变化的比例,累计相乘
scales=.1,.1
[convolutional]
# BN?
batch_normalize=1
# 输出特征图数
filters=32
# 卷积核的尺寸3X3
size=3
# 步长
stride=1
# pad=1,padding为size/2
pad=1
# 激励函数
activation=leaky
# Downsample
[convolutional]
batch_normalize=1
filters=64
size=3
stride=2
pad=1
activation=leaky
...
...
[convolutional]
size=1
stride=1
pad=1
# 每一个[region/yolo]层前的最后一个卷积层filters数
# 计算公式为filter=num*(classes+5)
# 5:tx,ty,tw,th,to
# 修改filters = 3 * (类别 + 5)
filters=45
activation=linear
[yolo]
mask = 6,7,8
# 修改anchors值
anchors = 8,8, 10,12, 13,23, 14,16, 20,11, 21,39, 35,20, 41,38, 61,61
# 类别
classes=10
num=9
# 通过抖动增加噪声,抑制过拟合
jitter=.3
ignore_thresh = .5
truth_thresh = 1
random=1
...
...
[convolutional]
size=1
stride=1
pad=1
# 修改filters值
filters=45
activation=linear
[yolo]
mask = 3,4,5
# 修改anchors值
anchors = 8,8, 10,12, 13,23, 14,16, 20,11, 21,39, 35,20, 41,38, 61,61
# 类别
classes=10
num=9
jitter=.3
ignore_thresh = .5
truth_thresh = 1
random=1
[route]
layers = -4
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
[upsample]
stride=2
[route]
# 将两层的featuremap做concat
layers = -1, 36
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky
[convolutional]
size=1
stride=1
pad=1
# 修改filters值
filters=45
activation=linear
[yolo]
# 当前属于第几个预选框
mask = 0,1,2
# 修改anchors值
# 若不设置,默认是0.5
anchors = 8,8, 10,12, 13,23, 14,16, 20,11, 21,39, 35,20, 41,38, 61,61
# 类别,不加1
classes=10
# anchor的数量
num=9
# 通过抖动增加噪声,防止过拟合
jitter=.3
# 是否需要计算IOU误差的参数
# 大于thresh,IOU误差不会在cost function??
ignore_thresh = .5
truth_thresh = 1
# random=1,启用Multi-Scale Training,随机使用多尺度图片进行训练
# random=0,训练图片大小与输入大小一致
random=1