AIPND-revision icon indicating copy to clipboard operation
AIPND-revision copied to clipboard

modified classifier.py to support weights parameters

Open malmassari opened this issue 1 year ago • 0 comments

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

malmassari avatar Sep 30 '23 10:09 malmassari