mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
minor fix
This commit is contained in:
@ -223,6 +223,7 @@ __global__ void fast_mean_delta_kernel(float *delta, float *variance, int batch,
|
||||
local[id] += (i+id < spatial) ? delta[index] : 0;
|
||||
}
|
||||
}
|
||||
__syncthreads();
|
||||
|
||||
if(id == 0){
|
||||
mean_delta[filter] = 0;
|
||||
@ -251,6 +252,7 @@ __global__ void fast_variance_delta_kernel(float *x, float *delta, float *mean,
|
||||
local[id] += (i+id < spatial) ? delta[index]*(x[index] - mean[filter]) : 0;
|
||||
}
|
||||
}
|
||||
__syncthreads();
|
||||
|
||||
if(id == 0){
|
||||
variance_delta[filter] = 0;
|
||||
@ -446,6 +448,7 @@ __global__ void fast_mean_kernel(float *x, int batch, int filters, int spatial,
|
||||
local[id] += (i+id < spatial) ? x[index] : 0;
|
||||
}
|
||||
}
|
||||
__syncthreads();
|
||||
|
||||
if(id == 0){
|
||||
mean[filter] = 0;
|
||||
@ -474,6 +477,7 @@ __global__ void fast_variance_kernel(float *x, float *mean, int batch, int filt
|
||||
local[id] += (i+id < spatial) ? pow((x[index] - mean[filter]), 2) : 0;
|
||||
}
|
||||
}
|
||||
__syncthreads();
|
||||
|
||||
if(id == 0){
|
||||
variance[filter] = 0;
|
||||
|
@ -127,6 +127,7 @@ void forward_convolutional_layer_gpu(convolutional_layer l, network_state state)
|
||||
activate_array_ongpu(l.output_gpu, l.outputs*l.batch, l.activation);
|
||||
//if(l.dot > 0) dot_error_gpu(l);
|
||||
if(l.binary || l.xnor) swap_binary(&l);
|
||||
//cudaDeviceSynchronize(); // for correct profiling of performance
|
||||
}
|
||||
|
||||
void backward_convolutional_layer_gpu(convolutional_layer l, network_state state)
|
||||
|
Reference in New Issue
Block a user