-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Added annotation typing to mnasnet #2856
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2856 +/- ##
=======================================
Coverage 73.36% 73.37%
=======================================
Files 99 99
Lines 8787 8790 +3
Branches 1387 1387
=======================================
+ Hits 6447 6450 +3
Misses 1916 1916
Partials 424 424
Continue to review full report at Codecov.
|
torchvision/models/mnasnet.py
Outdated
import torch.nn as nn | ||
from .utils import load_state_dict_from_url | ||
from torch.jit.annotations import Dict, List |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we now use Python3, you can now import Dict
and List
from typing
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this is not very important as a change, but it is a nice cleanup that could be done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I thought it was for jittability reasons on those specific types. I'll update the other PRs too then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* style: Added annotation typing for mnasnet * refactor: Removed un-necessary import
* style: Added annotation typing for mnasnet * refactor: Removed un-necessary import
Hi there!
As per #2025, annotation typing are welcome in torchvision. So, this PR focuses on
torchvision.models.mnasnet
this PR !Any feedback is welcome!