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

Unexpected behavior from min_examples_in_class #6

Closed
jfb54 opened this issue Mar 13, 2021 · 2 comments
Closed

Unexpected behavior from min_examples_in_class #6

jfb54 opened this issue Mar 13, 2021 · 2 comments

Comments

@jfb54
Copy link

jfb54 commented Mar 13, 2021

The official meta-dataset does not have the parameter min_examples_in_class exposed (as far as I know). I set it to 1 as I wanted any class to have at least one example and I get the error message when I turn on use_bilevel_hierarchy for Omniglot (which is standard for Meta-Dataset).

"use_bilevel_hierarchy" is incompatible with "min_examples_in_class"

I don't understand why this restriction is required.

@mboudiaf
Copy link
Owner

So this condition actually comes from the original code at https://github.com/google-research/meta-dataset/blob/ec57aeb8356d9c1c8dfb0cc6edfe23a4eb2c4614/meta_dataset/data/sampling.py#L314 .

I am not really sure why this condition has to be satisfied to be honest, and found no further explanation in the source code. If I had to guess though, I would say that all classes in Omniglot have exactly 20 samples, and so if the user sets this argument to < 20, nothing will happen, and if >= 20, all classes will be skipped. So this incompatibility may have just be put in place as a precaution.

@jfb54
Copy link
Author

jfb54 commented Mar 15, 2021

Got it. Thanks for the clarification.

@jfb54 jfb54 closed this as completed Mar 15, 2021
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