inc-few-shot-attractor-public icon indicating copy to clipboard operation
inc-few-shot-attractor-public copied to clipboard

Questions about the mini-Imagenet experiment

Open Veagau opened this issue 4 years ago • 3 comments

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?

Veagau avatar Jul 26 '20 15:07 Veagau

@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) `

wusuoweima avatar Aug 25 '20 04:08 wusuoweima

Thanks. I will have a try.

Veagau avatar Aug 26 '20 00:08 Veagau

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.

renmengye avatar Aug 31 '20 15:08 renmengye