Skip to content
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

boolean index did not match indexed array along dimension 0 #41

Open
hhhwww123 opened this issue Apr 4, 2019 · 1 comment
Open

boolean index did not match indexed array along dimension 0 #41

hhhwww123 opened this issue Apr 4, 2019 · 1 comment

Comments

@hhhwww123
Copy link

Hi, thank you for your work. I meet a problem when I run the evaluate.py. I change the input image size into (473,473) and raise the error:
500 images are loaded!
473 4730 processd
Need 6 x 3 prediction tiles @ stride 316 px
Predicting tile 1
evaluate.py:119: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
padded_prediction = net(Variable(torch.from_numpy(padded_img), volatile=True).cuda())
Predicting tile 2
Predicting tile 3
Predicting tile 4
Predicting tile 5
Predicting tile 6
Predicting tile 7
Predicting tile 8
Predicting tile 9
Predicting tile 10
Predicting tile 11
Predicting tile 12
Predicting tile 13
Predicting tile 14
Predicting tile 15
Predicting tile 16
Predicting tile 17
Predicting tile 18
Traceback (most recent call last):
File "evaluate.py", line 255, in
main()
File "evaluate.py", line 238, in main
seg_pred = seg_pred[ignore_index]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 1024 but corresponding boolean dimension is 473

How can I solve this problem ???

@ZOUWENMIN
Copy link

have you solved your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants