Skip to content
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

modified classifier.py to support weights parameters #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

malmassari
Copy link

The changes to classifier.py add pre-trained weights parameter support and remove the deprecated pretrained=true flag when initializing the pre-trained CNN models. This will resolve issue #15.

Caveats and advantages of this change:

  1. It uses the Default weights for better performance by using the best available weights (currently an alias for IMAGENET1K_V2) resulting in an improved performance when I timed the execution of check_images.py.
  2. by using _Weights.DEFAULT we ensure that the code does not break if weights may change across versions.
    Check the following link for more information:
    https://pytorch.org/vision/stable/models.html#models-and-pre-trained-weights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant