yaoyao-liu / meta-transfer-learning

TensorFlow and PyTorch implementation of "Meta-Transfer Learning for Few-Shot Learning" (CVPR2019)
https://lyy.mpi-inf.mpg.de/mtl/
MIT License
731 stars 147 forks source link

a question about 'trlog' #21

Open Sword-keeper opened 4 years ago

Sword-keeper commented 4 years ago

it's really a excellent code. As a beginner,it's very convenient for me to run this code. At the same time, when the code is finished, I found that I couldn't open the 'trlog'. Could you tell me how to open this file? Thank you!

yaoyao-liu commented 4 years ago

Thanks for your interest in our work.

The trlog is a tensorboard file that records some log information like training loss. If you hope to open this file, you may follow the instructions in this link.

If you have any further questions, feel free to add additional comments.

Sword-keeper commented 4 years ago

Thank you for your timely response. It's really friendly to beginner. I think it's much helpful to my study.

Sword-keeper commented 4 years ago

I‘m here again ! I have read your code's pre.py and meta.py . I found that both your pretrain phase's 'load meta-val set'(line 46) and meta phase's 'load meta-val set'(line 52) is loaded from mini/val. (16 classes)However,in the pretrain phase, the train data is from mini/train(64 classes). If I was right, I have questions as follows:

  1. The model's feature extractor part( big theta),is trained by 64 classes. And your meta train set is loaded from this 64 classes. It's a common in fsl/meta learning/transfer learning? If it was,could you give me some theory about this? As a beginner, I know the first time about this. Thank you.
  2. Why use mini\val data as val-set in the pretrain phase? Maybe i'm wrong haha. Thank you very much!
yaoyao-liu commented 4 years ago

Answer to Question 1: For the pre-train phase and meta-train phase, we use the same data, e.g., 64-class data in miniImageNet. As far as I know, it is common for most of few-shot learning methods using the pre-trained model, e.g., [Chen et al. ICLR 2019], [Oreshkin et al. NeurIPS 2018]. The reason is that we are only allowed to use the meta-train data in few-shot classification benchmarks like miniImageNet. In real-world applications, you may use the model pre-trained on more massive datasets if it is possible.

Answer to Question 2: In the pre-train phase, we aim to find the optimal initialization model for meta-train phase instead of the 64-class classification task, So the pre-trained model is validated on the tasks sampled from meta-val set.

Sword-keeper commented 4 years ago

Thank you for your response ! Happy new year !