zh0ngtian / YOLOv2-TensorFlow

Implement the test part of YOLOv2 with TensorFlow.
12 stars 1 forks source link

SORRY TO BOTHER YOU, BUT CAN YOU HELP ME WITH THIS ERROR? #2

Closed shuoyuanxu closed 6 years ago

shuoyuanxu commented 6 years ago

Traceback (most recent call last): File "F:/Desktop/YOLOv2/YOLO_coco_test.py", line 525, in main() File "F:/Desktop/YOLOv2/YOLO_coco_test.py", line 500, in main yolo = YOLO_TF(len(img_set), input_size, threshold) File "F:/Desktop/YOLOv2/YOLO_coco_test.py", line 43, in init self.build_networks() File "F:/Desktop/YOLOv2/YOLO_coco_test.py", line 80, in build_networks self.reor_27 = self.reorg_layer(27, self.conv_26) File "F:/Desktop/YOLOv2/YOLO_coco_test.py", line 114, in reorg_layer np.expand_dims(np.tile(np.array([[1, 0], [1, 0], [0, 0], [0, 0]]), (width * channel / 4, width / 2)), 0), File "C:\Program Files\Anaconda3\lib\site-packages\numpy\lib\shape_base.py", line 914, in tile return c.reshape(shape_out) TypeError: 'float' object cannot be interpreted as an integer

I did exactly what wrote in the README

Abd2z commented 6 years ago

I also got same error!!

shuoyuanxu commented 6 years ago

change all / to // and it works

Shuoyuan Xu shuoyxu@gmail.com shuoyuan.xu@cranfield.ac.uk 07756178945

2018-01-02 3:48 GMT+00:00 GooFace2 notifications@github.com:

I also got same error!!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/YaoZhongtian/YOLOv2-test-with-TensorFlow/issues/2#issuecomment-354699616, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPF_PhqiAQxccdsGKFub00bjNnBhRuQks5tGab6gaJpZM4RI9TP .

zh0ngtian commented 6 years ago

@shuoyuanxu is right. This error is caused by the difference between python2 and python3.

shuoyuanxu commented 6 years ago

i fixed it, but still thank you so much

Shuoyuan Xu shuoyxu@gmail.com shuoyuan.xu@cranfield.ac.uk 07756178945

2018-01-05 6:37 GMT+00:00 YaoZhongtian notifications@github.com:

@shuoyuanxu https://github.com/shuoyuanxu is right. This error is caused by the difference between python2 and python3.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/YaoZhongtian/YOLOv2-test-with-TensorFlow/issues/2#issuecomment-355483485, or mute the thread https://github.com/notifications/unsubscribe-auth/AUPF_KZ-og7GWlRX7iNXCXpiBk8hOneFks5tHcMZgaJpZM4RI9TP .