yolo2_light icon indicating copy to clipboard operation
yolo2_light copied to clipboard

Training custom BIT1-XNOR tiny-yolov2 with input size 224x224

Open ghimiredhikura opened this issue 5 years ago • 2 comments

I am trying to train BIT1-XNOR tiny-yolov2 with input size 224x224. Here is my .cfg file.

tiny-yolo-obj_xnor_new-224x224.zip

Training time there is no issue, it can train smoothly. But while I am testing, it gives following error.

CUDA Error: an illegal memory access was encountered
CUDA Error: an illegal memory access was encountered: No error

Am I missing something here? Thanks.

darknet\x64> .\darknet.exe detector test tiny-yolo-voc_xnor/voc.data tiny-yolo-voc_xnor
/tiny-yolo-obj_xnor_new-224x224.cfg tiny-yolo-voc_xnor/backup/tiny-yolo-obj_xnor_new-224x224_100.weights -i 0 data/dog.jp
g
layer     filters    size              input                output
   0 conv     16  3 x 3 / 1   224 x 224 x   3   ->   224 x 224 x  16 0.043 BF
   1 max          2 x 2 / 2   224 x 224 x  16   ->   112 x 112 x  16 0.001 BF
   2 convXB   32  3 x 3 / 1   112 x 112 x  16   ->   112 x 112 x  32 0.116 BF
   3 max          2 x 2 / 2   112 x 112 x  32   ->    56 x  56 x  32 0.000 BF
   4 convXB   64  3 x 3 / 1    56 x  56 x  32   ->    56 x  56 x  64 0.116 BF
   5 max          2 x 2 / 2    56 x  56 x  64   ->    28 x  28 x  64 0.000 BF
   6 convXB  128  3 x 3 / 1    28 x  28 x  64   ->    28 x  28 x 128 0.116 BF
   7 max          2 x 2 / 2    28 x  28 x 128   ->    14 x  14 x 128 0.000 BF
   8 convXB  256  3 x 3 / 1    14 x  14 x 128   ->    14 x  14 x 256 0.116 BF
   9 max          2 x 2 / 2    14 x  14 x 256   ->     7 x   7 x 256 0.000 BF
  10 convXB  512  3 x 3 / 1     7 x   7 x 256   ->     7 x   7 x 512 0.116 BF
  11 max          2 x 2 / 1     7 x   7 x 512   ->     7 x   7 x 512 0.000 BF
  12 convXB 1024  3 x 3 / 1     7 x   7 x 512   ->     7 x   7 x1024 0.462 BF
  13 convX  1024  3 x 3 / 1     7 x   7 x1024   ->     7 x   7 x1024 0.925 BF
  14 conv    125  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x 125 0.013 BF
  15 detection
mask_scale: Using default '1.000000'
Total BFLOPS 2.023
Loading weights from tiny-yolo-voc_xnor/backup/tiny-yolo-obj_xnor_new-224x224_100.weights...
 seen 64
Done!
CUDA Error: an illegal memory access was encountered
CUDA Error: an illegal memory access was encountered: No error

ghimiredhikura avatar Nov 14 '18 09:11 ghimiredhikura

Yes, there is some issue with XNOR model for width or height <= 224.

Try to use width=256 height=256 or higher (any value mutliple of 32).

AlexeyAB avatar Nov 14 '18 11:11 AlexeyAB

Thank you @AlexeyAB for your reply. It is working now with 256 x 256 input size 👍.

I have one more question though. Training BIT1-XNOR based on tiny-yolo-obj_xnor.cfg seems to give reasonable performance. But with bigger net such as yolov2 (I removed route and reorg layer) training loss is stuck around ~2.6, worst than tiny-yolov2-xnor! Here is my cfg file. yolov2-voc_xnor.zip

Any idea please, it will be really helpful. Thank you in advance.

Best, Deepak

ghimiredhikura avatar Nov 15 '18 06:11 ghimiredhikura