yhenon / keras-spp

Spatial pyramid pooling layers for keras
MIT License
394 stars 143 forks source link

ROI pooling examples issues #20

Open qalid7 opened 6 years ago

qalid7 commented 6 years ago

Hello people

thanks for sharing this and providing the examples.

I've the test_spp file running without any issues (i.e. it prints the final message) but I get errors in the test_roi_pooling, the basic one being related to line 55: X_curr = X_img[0, X_roi[0, roi, 0]:X_roi[0, roi, 2], X_roi[0, roi, 1]:X_roi[0, roi, 3], :] TypeError: slice indices must be integers or None or have an __index__ method

I tried manually changing the initials to different settings but can't get really get it working, or get my head around it. Given the first test is successful, I thought this might be a common issue?

Btw, I get the exact same error when running the other roi test: test_roi_pooling_conv, at line 59:

X_roi[0, roi, 0]:X_roi[0, roi, 0] + X_roi[0, roi, 2], :] TypeError: slice indices must be integers or None or have an __index__ method

.. which makes me believe there is a typo or something?

jingweimo commented 6 years ago

Any progress on the issue? I encountered the same issues above

jingweimo commented 6 years ago

I used anaconda with python 3.5 environment, keras 2.2 and theano 1.02.