-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't instantiate abstract class Classifier with abstract methods forward #7
Comments
If I were you I would create a new environment, reinstall latest pypi of pytorch-lightning, and see if that solves your issue. I just re-ran the colab notebook and its fine, so there's got to be something wrong with your local environment. |
Thank you for the quick reply. I installed pytorch-lightning just a few days ago. The issue might be my outdated transformer package. I will try it out and return with the results. |
sounds good! I do think its lightning, though. My guess is a |
Thank you! Updated both transformer and pytorch-lightning package. It's no longer an issue. Tuning local environment is a bit of a chore. Also some parameters such as GPU index needs to be adjusted. |
Great! glad it worked out for you. And yea, the gpu stuff should be updated to whatever the latest syntax is. Closing this now - cheers. |
Hi
Thank you for this straight forward codes for us to practice fine-tuning models with ViT. I'm on a project that classifying book covers. Everything goes well on my own dataset until trying to define classifier. An error message popped up "Can't instantiate abstract class Classifier with abstract methods forward". As I looked up the pytorch lightning code about forward(), it is indeed an abstract class. No idea why the error since the method was initiated in the init() method.
Has anyone run into this issue yet?
The text was updated successfully, but these errors were encountered: