Open vatsalsaglani opened 5 years ago
@vatsalsaglani were you able to get the solution for this?
Thank you, KK
The only thing I have figured out is that we can put a representational data loader which represents images(used MAML for Computer Vision project) from every class/category and then use the test method. Its basically comparing the input image with all the images in our representational data loader. Haven't given it a try, but you can try it if that works.
Please share the solution if you are able to find one. Thanks.
Thanks for your input. I will give a try on that.
Just wanted to how the task are being selected in MAML ? For example, in this example it has been selected as 4.
Thank you, KK
From the MiniImageNet train file, while making the Dataloader, the task_num is taken, which is clear that it depicts batch_size.
Generally, in meta-learning, we have batches, and inside batches, we have set, here we have support sets, i.e. train sets and query sets, i.e. valid set and inside the sets we have the data. The number of data-points(images) for the support set is given using the variable k-shots, and the number of data-points(images) for the query set is passed using the k-query. Now, meta-learners are trained using the concept of episodic training, which might mean that for maximum, how many times are we willing to train the model on the same chunk of data-points(images), and here its n-ways. So you train a batch n-times(n-ways) which has m-tasks/batches and every task/batch has two sets, support, and query, and each of these sets has k-images and labels corresponding to them.
Correct me if I am wrong, it's my understanding of meta-learning after reading a bunch of papers on different meta-learning strategies and coding them out in PyTorch. I hope I cleared your doubts. Thanks for the reply, I am assured that I am not the only one stuck here to take the trained model to production.
@vatsalsaglani Thank you so much for the complete details.
Is there any way to predict the image class when a single image is passed through the trained MAML model like it's done in ResNet or other pre-trained or custom trained models?
@vatsalsaglani were you able to get the solution for this?
Thank you, KK
Sorry to bother you ,Have you solved the problem? 1.Which information of Meta should I save when I finish Meta-training ? 2.How can I use this information to fine-tuning my model by support set in meta-testing? 3.How can I use the model completing fine-tuning to predict only one picture? Thanks!
Is there any way to predict the image class when a single image is passed through the trained MAML model like it's done in ResNet or other pre-trained or custom trained models?