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: Sample larger than population or is negative #1

Open
sreecharan31 opened this issue Sep 7, 2021 · 5 comments
Open

ValueError: Sample larger than population or is negative #1

sreecharan31 opened this issue Sep 7, 2021 · 5 comments

Comments

@sreecharan31
Copy link

~\anaconda3\envs\mask2face\lib\random.py in sample(self, population, k)
361 n = len(population)
362 if not 0 <= k <= n:
--> 363 raise ValueError("Sample larger than population or is negative")
364 result = [None] * k
365 setsize = 21 # size of a small set minus size of an empty list

ValueError: Sample larger than population or is negative

@Anuraag287
Copy link

Even am encountering the same issue. Did u find any solution?

@sreecharan31
Copy link
Author

yeah, it's working with celebA dataset.

@Anuraag287
Copy link

ohh, thank you!! and did u train it? I am having trouble training the model due to lack of appropriate computational resources.

@Broyojo
Copy link

Broyojo commented Nov 18, 2021

this is because the config has 15000 train images by default, but the default dataset includes fewer images, I believe there are only 13233 images, so just change the train images number in the config to 13233 or fewer.

@Daryl149
Copy link

@Broyojo's solution solved it. Had to reload the config and works like a charm.

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