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

Stuck in the while loop #1

Open
BadourAlBahar opened this issue Sep 14, 2018 · 3 comments
Open

Stuck in the while loop #1

BadourAlBahar opened this issue Sep 14, 2018 · 3 comments

Comments

@BadourAlBahar
Copy link

BadourAlBahar commented Sep 14, 2018

The code gets stuck in the while loop in train.py. This happens when torch.sum(seg[i_bs,0,xstart:xend,ystart:yend]) is equal to zero at which case (k x patch_size x
patch_size) will never reach zero and hence there is no exit from the loop.

Can you please explain the function of this while loop?

@xiaohulugo
Copy link

@BadourAlBahar I encounter exactly the same problem! Have you solved the problem?

@chandrakant-sonawane
Copy link

Even I got the same problem after few iterations. Does anyone got the solution for this problem?

@Pengxiao-Wang
Copy link

It works for me when i replaced the while loop condition with 'while torch.sum(seg[i_bs,0,xstart:xend,ystart:yend]) != 0 and torch.sum(seg[i_bs,0,xstart:xend,ystart:yend]) < kpatch_sizepatch_size :'. Since torch.sum might become zero after a few loops.

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

4 participants