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

Replace reshape with flatten for mobilenetv2. #3462

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

jkparuchuri
Copy link
Contributor

Current implementation is generating bad graph after onnx conversion. So replacing with flatten like in mobilenetv3 code.

Current implementation is generating bad graph after onnx conversion. So replacing with flatten like in mobilenetv3 code.
@facebook-github-bot
Copy link

Hi @jkparuchuri!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@jkparuchuri jkparuchuri changed the title Replace reshape with flatten Replace reshape with flatten. Feb 26, 2021
@jkparuchuri jkparuchuri changed the title Replace reshape with flatten. Replace reshape with flatten for mobilenetv2. Feb 26, 2021
@codecov
Copy link

codecov bot commented Feb 26, 2021

Codecov Report

Merging #3462 (a202320) into master (2e8c124) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3462   +/-   ##
=======================================
  Coverage   76.11%   76.12%           
=======================================
  Files         105      105           
  Lines        9697     9699    +2     
  Branches     1556     1556           
=======================================
+ Hits         7381     7383    +2     
  Misses       1836     1836           
  Partials      480      480           
Impacted Files Coverage Δ
torchvision/models/mobilenetv2.py 87.23% <100.00%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74d5e71...4ac294b. Read the comment docs.

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, thanks for the PR!

@datumbox datumbox merged commit b266c2f into pytorch:master Feb 26, 2021
facebook-github-bot pushed a commit that referenced this pull request Mar 4, 2021
Summary:
Current implementation is generating bad graph after onnx conversion. So replacing with flatten like in mobilenetv3 code.

Reviewed By: fmassa

Differential Revision: D26756271

fbshipit-source-id: 68751201436147c179532b4d35e1140cb0f56967

Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
@NicolasHug
Copy link
Member

@jkparuchuri @datumbox I'm tagging this as a "fix" but please let me know (or amend) if something else (like "improvement"?) would be more relevant :)

@fmassa fmassa added improvement and removed fix labels Mar 10, 2021
@datumbox
Copy link
Contributor

@NicolasHug sounds good to me!

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.

5 participants