Added cfg/yolov4-p5-frozen.cfg for training with pre-trained COCO-weights file yolov4-p5.weights

This commit is contained in:
AlexeyAB 2021-06-29 22:09:26 +03:00
parent 24bb6a8ebf
commit 85c6278ef1
3 changed files with 3682 additions and 2 deletions

File diff suppressed because it is too large Load Diff

1838
cfg/yolov4-p5-frozen.cfg Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1499,7 +1499,8 @@ network parse_network_cfg_custom(char *filename, int batch, int time_steps)
int k;
for (k = 0; k < l.n; ++k) {
net.layers[l.input_layers[k]].use_bin_output = 0;
net.layers[l.input_layers[k]].keep_delta_gpu = 1;
if (count >= last_stop_backward)
net.layers[l.input_layers[k]].keep_delta_gpu = 1;
}
}else if (lt == UPSAMPLE) {
l = parse_upsample(options, params, net);
@ -1507,7 +1508,8 @@ network parse_network_cfg_custom(char *filename, int batch, int time_steps)
l = parse_shortcut(options, params, net);
net.layers[count - 1].use_bin_output = 0;
net.layers[l.index].use_bin_output = 0;
net.layers[l.index].keep_delta_gpu = 1;
if (count >= last_stop_backward)
net.layers[l.index].keep_delta_gpu = 1;
}else if (lt == SCALE_CHANNELS) {
l = parse_scale_channels(options, params, net);
net.layers[count - 1].use_bin_output = 0;
@ -1655,6 +1657,8 @@ network parse_network_cfg_custom(char *filename, int batch, int time_steps)
l.learning_rate_scale = option_find_float_quiet(options, "learning_rate", 1);
option_unused(options);
if (l.stopbackward == 1) printf(" ------- previous layers are frozen ------- \n");
net.layers[count] = l;
if (l.workspace_size > workspace_size) workspace_size = l.workspace_size;
if (l.inputs > max_inputs) max_inputs = l.inputs;