Skip to content

Adding multiweight support for googlenet prototype model #4813

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

Merged
merged 4 commits into from
Nov 1, 2021

Conversation

datumbox
Copy link
Contributor

@datumbox datumbox commented Nov 1, 2021

Fixes partially #4672

cc @datumbox @bjuncek

@facebook-github-bot
Copy link

facebook-github-bot commented Nov 1, 2021

💊 CI failures summary and remediations

As of commit b42bdf6 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@datumbox datumbox requested a review from jdsgomes November 1, 2021 13:34
Copy link
Contributor Author

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

Just a few notes/clarifications:

@@ -25,43 +25,6 @@
_GoogLeNetOutputs = GoogLeNetOutputs


def googlenet(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> "GoogLeNet":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Literally just moving it to the bottom of the file so that we can use proper typing.

from .shufflenetv2 import *
from .vgg import *
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just reordering stuff and adding googlenet in the list.

weights = GoogLeNetWeights.ImageNet1K_TheCodezV1 if kwargs.pop("pretrained") else None
weights = GoogLeNetWeights.verify(weights)

remove_aux_logits = False
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lots of workarounds required by this model. I would appreciate a close review to ensure the new logic is aligned with the previous one.

Copy link
Contributor

@jdsgomes jdsgomes left a comment

Choose a reason for hiding this comment

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

LGTM! thanks for making the code more readable as well.

@datumbox datumbox merged commit 72054ca into pytorch:main Nov 1, 2021
@datumbox datumbox deleted the prototype/googlenet_multiweight branch November 1, 2021 14:35
@datumbox datumbox linked an issue Nov 1, 2021 that may be closed by this pull request
facebook-github-bot pushed a commit that referenced this pull request Nov 1, 2021
)

Summary:
* Move model builder at the bottom of the file, so we can use proper typing.

* Adding GoogLeNet with multi-weight support.

* Simplify expression.

Reviewed By: datumbox

Differential Revision: D32064696

fbshipit-source-id: 956d10181ff00faa114472e01e09ed06cfd38691
cyyever pushed a commit to cyyever/vision that referenced this pull request Nov 16, 2021
* Move model builder at the bottom of the file, so we can use proper typing.

* Adding GoogLeNet with multi-weight support.

* Simplify expression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-pretrained weights: Add initial API and basic implementation
3 participants