MarvinTeichmann / KittiSeg

A Kitti Road Segmentation model implemented in tensorflow.
MIT License
910 stars 403 forks source link

IndexError: index 256 is out of bounds for axis 0 with size 256 #39

Closed lizhidan closed 7 years ago

lizhidan commented 7 years ago

As the training program ran out of my 2G GPU memory, I reduced the number of pictures in the data_road and cut it into 256 × 256 size, but when run 'python evaluate.py', the following error occurred: 2017-04-18 16:27:51,679 INFO Output Images will be written to: RUNS/KittiSeg_pretrained/analyse/images/ W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 1.08GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available. W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 2.14GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available. W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 1.08GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available. incl/seg_utils/seg_utils.py:74: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 256 but corresponding boolean dimension is 375 fnArray = cur_prob[(gtBin == True) & (validMap == True)] Traceback (most recent call last): File "evaluate.py", line 122, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "evaluate.py", line 110, in main ana.do_analyze(logdir) File "incl/tensorvision/analyze.py", line 95, in do_analyze hypes, sess, image_pl, inf_out) File "RUNS/KittiSeg_pretrained/model_files/eval.py", line 119, in evaluate FN, FP, posNum, negNum = eval_image(hypes, gt_image, output_im) File "RUNS/KittiSeg_pretrained/model_files/eval.py", line 30, in eval_image validArea=valid_gt) File "incl/seg_utils/seg_utils.py", line 74, in evalExp fnArray = cur_prob[(gtBin == True) & (validMap == True)] IndexError: index 256 is out of bounds for axis 0 with size 256 I don't know how to solve this problem,can you help me? Thank you!

MarvinTeichmann commented 7 years ago

Never ran across the error. Are you using pthon 2.7?

lizhidan commented 7 years ago

Yes,I'm using python2.7.But I do it following your suggestion in''Out of Memory on 2GB GPU#20 by bubalazi was closed on 11 Mar'',it still ran out of memory.I don't kown how to do for solving the question.

MarvinTeichmann commented 7 years ago

You could try training on CPU...

lizhidan commented 7 years ago

Thank you ! I will have a try.