AIPND-revision
AIPND-revision copied to clipboard
modified classifier.py to support weights parameters
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:
- 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.
- 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