yinboc/prototypical-network-pytorch

Can you provide demo.py?

ujsyehao opened this issue · 1 comments

Hi, I have trained the model use mini-imagenet dataset, and use test.py, But I want to use the model to do inference(input one image and get its result), I don't know how to write the demo.py. Can you provide me some advice?
According to my understanding, when I test on single image, I at least provide the number of trained classes' images, it is right?

Yes. If you are familiar with Pytorch you can easily modify test.py. For example, replace data_query with 1-image-batch (one choice is to sample one inside it).