We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Chapter 2 uses this code to get the model labels:
with open('../data/p1ch2/imagenet_classes.txt') as f: labels = [line.strip() for line in f.readlines()]
However, it is never made clear where the file imagenet_classes.txt comes from.
imagenet_classes.txt
It turns out that they are already in torchvision.models:
torchvision.models
from torchvision import models labels = models.ResNet101_Weights.DEFAULT.meta['categories']
It would be useful to update the book to make this clear, or at least put it in the errata.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Chapter 2 uses this code to get the model labels:
However, it is never made clear where the file
imagenet_classes.txt
comes from.It turns out that they are already in
torchvision.models
:It would be useful to update the book to make this clear, or at least put it in the errata.
The text was updated successfully, but these errors were encountered: