Zasder3 / train-CLIP

A PyTorch Lightning solution to training OpenAI's CLIP from scratch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'clip'

Jiang15 opened this issue · comments

Thanks for your great work! when I call train.py with my dataset. I have ModuleNotFoundError: No module named 'clip'. Do I miss something?

Sorry I haven't made a file stating the dependencies; it requires the original CLIP repository's pip installation protocol. Simply enter the following into your terminal and it will install the clip module:

$ pip install git+https://github.com/openai/CLIP.git

This is an important point. Our repo starts from random inits and CLIP used 400M text image pairs. They don't even state what their accuracy is during a batch... One thing that could be helpful is using a pretrained initialization and see what happens from there. I'll make sure I double check to ensure the accuracy is correct though.

Looks like the accuracy calculation was incorrect! I'll update the repo.

Hi @Jiang15, the photo you sent over sadly isn't visible. Try using the GitHub website or app to insert it.

Although I can't see your error I do have some useful feedback on reloading the weights. Lightning requires you to actually use the checkpoints that the training run spits out. There's likely folder called lightning_Logs that will have your model saved. Checkout the documentation here and use the class CLIPWrapper to receive the checkpoint.