-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: index 1000 is out of bounds for axis 0 with size 1000 #99
Comments
I solved this, it was a version compatibility issue. |
I got the same problem. |
I solved it by using tensorflow 1.15 and keras 2.2.4 |
My environment is tensorflow 1.15 and keras 2.3.1 |
I realized it was a version compatibility when it was working on some environments and not others. after some googling i realized that I had to use the specific Keras version that is compatible with the installed tensorflow version, and since the original repo does not mention anything about the environment i did some experimenting. what worked for me was using Colab with TF 1.15.2 and Keras 2.2.4, so basically since its TF 1.x you should use the compatible Keras version, to know which Keras is compatible, install TF and run the following code:
the output will be your current TF version and what Keras version you should install. in case you are on Colab switch to TF 1.x by running:
and then install Keras by running the code below, just keep in mind that you may have to run this twice as sometimes it doesn't install it on the first try (i have no idea why lol)
then it doesn't hurt to double check your installations one more time
|
Ok, I will try again and see if there is any progress I will let you know. |
Did you find any solution?Mine still says the same even if I changed the keras and tensorflow version |
I solved this error. The error happens because it miss a "b" in the line 263. So line 274 wont be executed and iter_num wont be set to 0. This provocate the error "index 1000 is out of bounds for axis 0 with size 10001" in the line 243 when the loop start again. The correct line of code is for line 263 is: print(f'Mean number of bounding boxes from RPN overlapping ground truth boxes: {mean_overlapping_bboxes}') |
Thank you but can you tell me on which file I should edit this? |
train_rcnn.py |
try to # if C.verbose: |
I am getting the following exception when I run the train_frcnn.py file, when the model finishes running the epochs it goes into an infinite loop printing out the same exception
1000/1000 [==============================] - 592s - rpn_cls: 0.0000e+00 - rpn_regr: 0.0000e+00 - detector_cls: 0.0000e+00 - detector_regr: 0.0000e+00
Exception: name 'mean_overlapping_boxes' is not defined
Average number of overlapping bounding boxes from RPN = 56.069 for 1000 previous iterations
Exception: index 1000 is out of bounds for axis 0 with size 10001
I use the following command to run the train_frcnn.py
python train_frcnn.py -o simple -p annotate2.txt --num_epochs=1
I traced back the error to line 243 in train_rcnn.py:
did anyone get the same exception or know what is the issue?
this is my first time posting a question so I apologize if i didnt provide much details, please let me know what I missed
The text was updated successfully, but these errors were encountered: