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

Details about the implementation #2

Closed
dremaker52 opened this issue Jun 3, 2018 · 6 comments
Closed

Details about the implementation #2

dremaker52 opened this issue Jun 3, 2018 · 6 comments

Comments

@dremaker52
Copy link

Dear authors, I tried to re-implement the paper but failed to get the performance in the paper. I think there may be some details I missed. I trained a cosine-based classifier on base classes (64 classes) and the accuracy is about 57% on validation set. When I extract the feature before classification, which is 3200-d for C128, the 5-way, 1-shot accuracy is only about 46% on test classes and 43% on val classes. Do you have some suggestions on the implementation? Thanks.

@debasmitdas
Copy link

Can you upload your implementation ?

@dremaker52
Copy link
Author

I just modified code from here https://github.com/apache/incubator-mxnet/tree/master/example/image-classification. I only change the network architecture to 4 conv blocks.

@pengzhou1108
Copy link

@dremaker52 I am also trying to re-implement the network. Could you tell me how did you implement the 2nd training procedure? (the novel weight generator)

@gidariss
Copy link
Owner

gidariss commented Jul 5, 2018

Hi all, I just uploaded the implementation code.

@pengzhou1108
Copy link

@gidariss Thanks for the update. How many epoch you have trained to get the numbers reported in README? I just tried 60 epoch for both stage 1 and 2 of training and only got 50.3% of the novel classes for 5-way 1-shot miniImageNet dataset. (Conv128)

@gidariss
Copy link
Owner

In all Mini-Imagenet experiments both training stages last for 60 training epochs. However, because the training split of Mini-Imagenet is relatively small and there is a danger of overfitting, the training snapshot (i.e., the model parameters at the end of each training epoch) that "survive" from each training stage is that that achieves the highest accuracy on the novel categories of the validation split of Mini-Imagenet. In other words, there is early stopping strategy in order to avoid overfitting.

So, for the model with the Conv128 feature extractor, at the 1st training stage the training snapshot that is kept at the end is that of the 25th training epoch and at the 2nd training stage the training snapshot that is kept at the end is that of the 35th training epoch. This actually means that for the Covn128 case many of the 60 training epochs are actually useless and can be avoided.

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