mirror of https://github.com/AlexeyAB/darknet.git
Fixed ./darknet partial for Anti-aliasing
This commit is contained in:
parent
7018be435f
commit
e345b8793c
|
@ -607,19 +607,6 @@ convolutional_layer make_convolutional_layer(int batch, int steps, int h, int w,
|
|||
}
|
||||
else {
|
||||
for (i = 0; i < blur_nweights; i += (blur_size*blur_size)) {
|
||||
/*
|
||||
l.input_layer->weights[i + 0] = 0;
|
||||
l.input_layer->weights[i + 1] = 0;
|
||||
l.input_layer->weights[i + 2] = 0;
|
||||
|
||||
l.input_layer->weights[i + 3] = 0;
|
||||
l.input_layer->weights[i + 4] = 1;
|
||||
l.input_layer->weights[i + 5] = 0;
|
||||
|
||||
l.input_layer->weights[i + 6] = 0;
|
||||
l.input_layer->weights[i + 7] = 0;
|
||||
l.input_layer->weights[i + 8] = 0;
|
||||
*/
|
||||
l.input_layer->weights[i + 0] = 1 / 16.f;
|
||||
l.input_layer->weights[i + 1] = 2 / 16.f;
|
||||
l.input_layer->weights[i + 2] = 1 / 16.f;
|
||||
|
@ -635,8 +622,10 @@ convolutional_layer make_convolutional_layer(int batch, int steps, int h, int w,
|
|||
}
|
||||
for (i = 0; i < n; ++i) l.input_layer->biases[i] = 0;
|
||||
#ifdef GPU
|
||||
l.input_antialiasing_gpu = cuda_make_array(NULL, l.batch*l.outputs);
|
||||
push_convolutional_layer(*(l.input_layer));
|
||||
if (gpu_index >= 0) {
|
||||
l.input_antialiasing_gpu = cuda_make_array(NULL, l.batch*l.outputs);
|
||||
push_convolutional_layer(*(l.input_layer));
|
||||
}
|
||||
#endif // GPU
|
||||
}
|
||||
|
||||
|
|
|
@ -127,19 +127,6 @@ maxpool_layer make_maxpool_layer(int batch, int h, int w, int c, int size, int s
|
|||
}
|
||||
else {
|
||||
for (i = 0; i < blur_nweights; i += (blur_size*blur_size)) {
|
||||
/*
|
||||
l.input_layer->weights[i + 0] = 0;
|
||||
l.input_layer->weights[i + 1] = 0;
|
||||
l.input_layer->weights[i + 2] = 0;
|
||||
|
||||
l.input_layer->weights[i + 3] = 0;
|
||||
l.input_layer->weights[i + 4] = 1;
|
||||
l.input_layer->weights[i + 5] = 0;
|
||||
|
||||
l.input_layer->weights[i + 6] = 0;
|
||||
l.input_layer->weights[i + 7] = 0;
|
||||
l.input_layer->weights[i + 8] = 0;
|
||||
*/
|
||||
l.input_layer->weights[i + 0] = 1 / 16.f;
|
||||
l.input_layer->weights[i + 1] = 2 / 16.f;
|
||||
l.input_layer->weights[i + 2] = 1 / 16.f;
|
||||
|
@ -155,8 +142,10 @@ maxpool_layer make_maxpool_layer(int batch, int h, int w, int c, int size, int s
|
|||
}
|
||||
for (i = 0; i < l.out_c; ++i) l.input_layer->biases[i] = 0;
|
||||
#ifdef GPU
|
||||
l.input_antialiasing_gpu = cuda_make_array(NULL, l.batch*l.outputs);
|
||||
push_convolutional_layer(*(l.input_layer));
|
||||
if (gpu_index >= 0) {
|
||||
l.input_antialiasing_gpu = cuda_make_array(NULL, l.batch*l.outputs);
|
||||
push_convolutional_layer(*(l.input_layer));
|
||||
}
|
||||
#endif // GPU
|
||||
}
|
||||
|
||||
|
|
|
@ -951,6 +951,8 @@ network parse_network_cfg_custom(char *filename, int batch, int time_steps)
|
|||
params.inputs = net.inputs;
|
||||
if (batch > 0) net.batch = batch;
|
||||
if (time_steps > 0) net.time_steps = time_steps;
|
||||
if (net.batch < 1) net.batch = 1;
|
||||
if (net.time_steps < 1) net.time_steps = 1;
|
||||
if (net.batch < net.time_steps) net.batch = net.time_steps;
|
||||
params.batch = net.batch;
|
||||
params.time_steps = net.time_steps;
|
||||
|
|
Loading…
Reference in New Issue