hytseng0509 / CrossDomainFewShot

Cross-Domain Few-Shot Classification via Learned Feature-Wise Transformation (ICLR 2020 spotlight)
323 stars 62 forks source link

pseudo seen and pseudo unseen domains #8

Open yxgnahz opened 4 years ago

yxgnahz commented 4 years ago

Hi, I found in your code that every epoch you split the ps and pu domains by random.sample(base_set, k=2), so you only use one domain as the ps domain and one another domain as the pu domain during your experiment?

hytseng0509 commented 4 years ago

We use one domain as the ps domain and one other domain as the pu domain for the same training epoch. Ideally, we should sample different sets for ps and pu domains for each training iteration. However, it is not very efficient as we need to re-configure the data loader for each training iteration. Instead, we perform the domain sampling for each training epoch due to practical consideration.

yxgnahz commented 4 years ago

Thanks for your response. I re-implemented your model in my work, and I observed that even if I load the pre-trained model, the validation accuracy will drop dramatically once starting back propagation with FT layer enabled (I tried to train on miniImagenet and test on CUB). Did you observe this during your training process?

hytseng0509 commented 4 years ago

No, I don't observe that problem. As long as the values of the transformation parameters in the FT layers are in a reasonable interval, the FT layers should help generalize the metric-based model.