sicara / easy-few-shot-learning

Ready-to-use code and tutorial notebooks to boost your way into few-shot learning for image classification.
MIT License
1.07k stars 147 forks source link

Cannot run the tutorial notebook in the local pc #135

Closed DickHanselRyan closed 9 months ago

DickHanselRyan commented 9 months ago

Problem I was trying the first few shot learning classifier by re-writing the whole code onto my PC, and when I got into the part of plotting the images, my VSCode showed an issue with Pickle.

Screenshot 2024-02-06 225324

Considered solutions I can run it on Google Colab, but I want to try and run it on my local environment. I use Python 3.10.13 with the latest EasyFSL version, torch=2.2 and cuda=12.1

ebennequin commented 9 months ago

This seems to be the same issue as #51 and it's related to multiprocessing issues with Windows. Follow this tutorial or disable multiprocessing in the DataLoader by setting num_workers=0.

DickHanselRyan commented 9 months ago

Hi, I've set the num_workers=0 and it works, but now I am facing another issue as shown on the screenshot. image image

ebennequin commented 9 months ago

It seems to be the exact same issue but with train_loader instead of test_loader. Did you set num_workers=0 for both?

DickHanselRyan commented 9 months ago

Thanks, I forgot to set the other num_workers=0 and got the same problem. It's fixed now. Thanks for the help.