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

Adds an example for resnet50 in half precision. #307

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

Conversation

monorimet
Copy link
Contributor

@monorimet monorimet commented Jan 3, 2024

Also renames the examples/resnet-18 directory to examples/resnet to avoid creating another directory. This might not be ideal, as the resnet50 example uses the torchvision model and the resnet18 script uses the microsoft/resnet-18 transformers model.

Copy link
Contributor

@IanNod IanNod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for this

# extractor = AutoFeatureExtractor.from_pretrained("microsoft/resnet-18")
model = resnet50(weights="DEFAULT")
float_model = model.eval().float()
model = model.eval().half()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we are only doing f16 instead of having an option/flag for whatever precision you want?

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.

2 participants