renmengye / inc-few-shot-attractor-public

Code for Paper "Incremental Few-Shot Learning with Attention Attractor Networks"
MIT License
118 stars 27 forks source link

Questions about the mini-Imagenet experiment #7

Open Veagau opened 4 years ago

Veagau commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

Thanks. I will have a try.

renmengye commented 4 years ago

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.