mirror of https://github.com/AlexeyAB/darknet.git
Added cfg/yolov4-p5-frozen.cfg for training with pre-trained COCO-weights file yolov4-p5.weights
This commit is contained in:
parent
24bb6a8ebf
commit
85c6278ef1
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1499,7 +1499,8 @@ network parse_network_cfg_custom(char *filename, int batch, int time_steps)
|
||||||
int k;
|
int k;
|
||||||
for (k = 0; k < l.n; ++k) {
|
for (k = 0; k < l.n; ++k) {
|
||||||
net.layers[l.input_layers[k]].use_bin_output = 0;
|
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) {
|
}else if (lt == UPSAMPLE) {
|
||||||
l = parse_upsample(options, params, net);
|
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);
|
l = parse_shortcut(options, params, net);
|
||||||
net.layers[count - 1].use_bin_output = 0;
|
net.layers[count - 1].use_bin_output = 0;
|
||||||
net.layers[l.index].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) {
|
}else if (lt == SCALE_CHANNELS) {
|
||||||
l = parse_scale_channels(options, params, net);
|
l = parse_scale_channels(options, params, net);
|
||||||
net.layers[count - 1].use_bin_output = 0;
|
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);
|
l.learning_rate_scale = option_find_float_quiet(options, "learning_rate", 1);
|
||||||
option_unused(options);
|
option_unused(options);
|
||||||
|
|
||||||
|
if (l.stopbackward == 1) printf(" ------- previous layers are frozen ------- \n");
|
||||||
|
|
||||||
net.layers[count] = l;
|
net.layers[count] = l;
|
||||||
if (l.workspace_size > workspace_size) workspace_size = l.workspace_size;
|
if (l.workspace_size > workspace_size) workspace_size = l.workspace_size;
|
||||||
if (l.inputs > max_inputs) max_inputs = l.inputs;
|
if (l.inputs > max_inputs) max_inputs = l.inputs;
|
||||||
|
|
Loading…
Reference in New Issue