Open erikguo opened 5 years ago
thank you. I will check this fault tomorrow.
@gmayday1997 when the layer conv-->max pool->route, the conv layer need net.layers[i+1] & net.layers[i+2], net.layers[i+2] is route layer, net.layers[i+2].biases is null, prune may make some mistake.
@erikguo @anhuipl2010 thanks for pointing this. I have fixed this bug, and it works well now. If you want to prune more parameters, you can set -shuffle equal 1, which means random pruning. On the basis of my experiment results, there is really little gap between random pruning and bn-scale pruning.
./darknet prune ./cfgfile ./weightsfile -rate 0.4 -shuffle 1
@gmayday1997 u are handsome. do u add sparsity train code for the last update?
@gmayday1997 your code fopen() function in prune, maybe take some mistake. maybe you can changed it to fopen("xxxx", "wb"); or fopen("xxxx", "w");
@anhuipl2010 thanks, I fixed that. :smile: :blush:
@erikguo can you please let me know how you installed this repo.
I git cloned this repo, 1) make clean 2) make 3) sh build.sh
[ 96%] Building CUDA object CMakeFiles/dark.dir/src/im2col_kernels.cu.o /mnt/darknet.CG/src/im2col_kernels.cu:125:18: warning: "/" within comment [-Wcomment] //data_col_ptr = (h >= 0 && w >= 0 && h < height && w < width) ? ^ /mnt/darknet.CG/src/im2col_kernels.cu:1178:6: warning: "/" within comment [-Wcomment] //((uint64_t )(A_s + (local_ilda + k) / 8)) = ((uint64_t )(A + (i_curlda + k) / 8)); // weights ^ CMakeFiles/darknet.dir/src/darknet.c.o: In function main': darknet.c:(.text.startup+0x70c): undefined reference to run_prune' collect2: error: ld returned 1 exit status CMakeFiles/darknet.dir/build.make:1318: recipe for target 'darknet' failed make[2]: [darknet] Error 1 CMakeFiles/Makefile2:133: recipe for target 'CMakeFiles/darknet.dir/all' failed make[1]: [CMakeFiles/darknet.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 96%] Building CUDA object CMakeFiles/dark.dir/src/maxpool_layer_kernels.cu.o [ 97%] Building CUDA object CMakeFiles/dark.dir/src/network_kernels.cu.o /mnt/darknet.CG/src/im2col_kernels.cu:125:18: warning: "/" within comment [-Wcomment] //data_col_ptr = (h >= 0 && w >= 0 && h < height && w < width) ? ^ /mnt/darknet.CG/src/im2col_kernels.cu:1178:6: warning: "/" within comment [-Wcomment] //((uint64_t )(A_s + (local_ilda + k) / 8)) = ((uint64_t )(A + (i_curlda + k) / 8)); // weights ^ [ 98%] Linking CUDA device code CMakeFiles/dark.dir/cmake_device_link.o [ 98%] Linking CXX shared library libdark.so [ 98%] Built target dark Makefile:129: recipe for target 'all' failed make: [all] Error 2 cp: target 'share/darknet/' is not a directory
Hello,
I build your darknet by build.sh successfully. Then I use 'darknet prune' command to prune my yolo3-spp. But I always failed when calculating pruning to layer 76.
Do I miss some thing ?
Thank you for your help