Fixed training with GPU=1 CUDNN=0

pull/6241/head
AlexeyAB 6 years ago
parent a95bc3f5b6
commit acb578cb37
  1. 1
      .circleci/config.yml
  2. 10
      src/convolutional_layer.c

@ -7,6 +7,7 @@ jobs:
working_directory: ~/work
steps:
- checkout
- run: nvcc --version
- run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 -j 8
- run: make clean
- run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 AVX=1 -j 8

@ -609,7 +609,9 @@ convolutional_layer make_convolutional_layer(int batch, int steps, int h, int w,
if (train) {
l.x_gpu = cuda_make_array(l.output, total_batch*out_h*out_w*n);
//l.x_norm_gpu = cuda_make_array(l.output, total_batch*out_h*out_w*n);
#ifndef CUDNN
l.x_norm_gpu = cuda_make_array(l.output, total_batch*out_h*out_w*n);
#endif // CUDNN
}
}
@ -778,10 +780,12 @@ void resize_convolutional_layer(convolutional_layer *l, int w, int h)
if (l->batch_normalize) {
cuda_free(l->x_gpu);
cuda_free(l->x_norm_gpu);
l->x_gpu = cuda_make_array(l->output, total_batch*l->outputs);
#ifndef CUDNN
cuda_free(l->x_norm_gpu);
l->x_norm_gpu = cuda_make_array(l->output, total_batch*l->outputs);
#endif // CUDNN
}
if (l->xnor) {

Loading…
Cancel
Save