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

Questions about the mini-Imagenet experiment #7

Open
Veagau opened this issue Jul 26, 2020 · 3 comments
Open

Questions about the mini-Imagenet experiment #7

Veagau opened this issue Jul 26, 2020 · 3 comments

Comments

@Veagau
Copy link

Veagau commented Jul 26, 2020

When I run the pretrain experiment on mini-Imagenet, I found that there is a KeyError in the 97th line of the "/fewshot/data/mini_imagenet.py" file, where the CSV_FILE doesn't have a key named 'train_phase_train'. Is it a mistake of your code or my operation?

@wusuoweima
Copy link

wusuoweima commented Aug 25, 2020

@renmengye
I found it too. I use the following setting:
`flags = tf.flags

flags.DEFINE_bool("eval", False, "Whether run evaluation only")

flags.DEFINE_bool("retest", False, "Reload everything")

flags.DEFINE_bool("test", True, "Whether to run test")
flags.DEFINE_bool("val", True, "Whether to run val")
flags.DEFINE_integer("nclasses_a", -1, "Number of classes for pretraining")
flags.DEFINE_integer("nclasses_b", 5, "Number of classes for few-shot")
flags.DEFINE_integer("nepisode", 600, "Number of evaluation episodes")
flags.DEFINE_integer("nepisode_final", 2000, "Number of evaluation episodes")
flags.DEFINE_integer("nshot", 1, "nshot")
flags.DEFINE_integer("ntest", 5, "Number of test images per episode")
flags.DEFINE_string("config", './configs/pretrain/mini-imagenet-resnet-snail-cos.prototxt', "Experiment config file")
flags.DEFINE_string("dataset", "mini-imagenet", "Dataset name")
flags.DEFINE_string("pretrain", None, "Restore checkpoint name")
flags.DEFINE_string("results", "./results", "Save folder")
flags.DEFINE_string("tag", 'mini-imagenet', "Experiment tag")
FLAGS = tf.flags.FLAGS
tf.logging.set_verbosity(tf.compat.v1.logging.ERROR)
`

@Veagau
Copy link
Author

Veagau commented Aug 26, 2020

Thanks. I will have a try.

@renmengye
Copy link
Owner

Hi,

You need to make sure that the mini-imagenet pickle files are in the right place. Sorry about the messy code but line 97 shouldn't be reached if the pickle files are in the right place.

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

3 participants