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

ValueError: empty range in randrange #58

Open
Kongsea opened this issue Nov 18, 2024 · 0 comments
Open

ValueError: empty range in randrange #58

Kongsea opened this issue Nov 18, 2024 · 0 comments

Comments

@Kongsea
Copy link

Kongsea commented Nov 18, 2024

File "liif/datasets/wrappers.py", line 118, in __getitem__
x0 = random.randint(0, img.shape[-2] - w_hr)                                                                                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                            File "anaconda/envs/pt/lib/python3.12/random.py", line 336, in randint
return self.randrange(a, b+1)                                                                                                                                                    ^^^^^^^^^^^^^^^^^^^^^^
File "anaconda/envs/pt/lib/python3.12/random.py", line 319, in randrange
raise ValueError(f"empty range in randrange({start}, {stop})")
ValueError: empty range in randrange(0, -4) 

The above error will be raised if there are too small images in the dataset.

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

1 participant