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

Add test to check that classification models are FX-compatible #3662

Merged
merged 5 commits into from
Jun 21, 2021

Conversation

fmassa
Copy link
Member

@fmassa fmassa commented Apr 13, 2021

This let us know if the FX-based approach for feature extraction from #3597 would be able to support all classification models in torchvision.

The current approach for feature extraction only work for a subset of the models, and notably doesn't work for inception-style models.

cc @kazhang @jamesr66a for visibility

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

small question but LGTM when green!

test/test_models.py Outdated Show resolved Hide resolved
Copy link
Contributor

@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.

LGTM! Are we merging this or what? :)

@fmassa
Copy link
Member Author

fmassa commented Apr 19, 2021

Give me some more time before merging this, there is still some things I'd like to check / verify before getting this in.

@NicolasHug
Copy link
Member

@fmassa I took care of merging with master and making this up-to-date with our new testing infra. LMK if I can help move this forward w.r.t. #3662 (comment) !

@fmassa
Copy link
Member Author

fmassa commented Jun 21, 2021

Thanks @NicolasHug !

Let's get this PR merged. I'm not yet sure if we will be adding as constraint that all classification models will be FX-compatible in the future, but at least having this check here will enable us to think about it if it breaks in the future.

@fmassa fmassa merged commit b4a075c into pytorch:master Jun 21, 2021
@fmassa fmassa deleted the check-fx-compat branch June 21, 2021 11:41
@github-actions
Copy link

Hey @fmassa!

You merged this PR, but no labels were added.

facebook-github-bot pushed a commit that referenced this pull request Jun 22, 2021
…le (#3662)

Summary:
* Add test to check that classification models are FX-compatible

* Replace torch.equal with torch.allclose

* remove skipling

Reviewed By: fmassa

Differential Revision: D29264313

fbshipit-source-id: 4e57e255c6ce680fc6deee6a9980a7d189e23597

Co-authored-by: Nicolas Hug <nicolashug@fb.com>
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.

4 participants