Skip to content

Conversation

@yaeldekel
Copy link

The ONNX spec for the Squeeze operator:

Remove single-dimensional entries from the shape of a tensor. Takes a parameter axes with a list of axes to squeeze. If axes is not provided, all the single dimensions will be removed from the shape. If an axis is selected with shape entry not equal to one, an error is raised.

Currently, as explained in issue #36796, it is possible to export such a model to ONNX, and this results in an exception from ONNX runtime.

Fixes #36796.

@dr-ci
Copy link

dr-ci bot commented May 14, 2020

💊 CI failures summary and remediations

As of commit a0d1116 (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).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 78 times.

@jerryzh168 jerryzh168 requested a review from houseroad May 15, 2020 20:51
@jerryzh168 jerryzh168 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 15, 2020
@neginraoof
Copy link
Contributor

You can catch flake8 issues locally using command: flake8 .
Thanks!

@ezyang ezyang requested review from neginraoof and removed request for houseroad May 26, 2020 20:05
@ezyang
Copy link
Contributor

ezyang commented May 26, 2020

@neginraoof when this is ready to land ping and I can land it

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Could you rebase to master and make sure all related tests passing?

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Please make sure all the ci passing:

  1. Lint / flake8-py3 (pull_request)
  2. onnx

Copy link
Contributor

@neginraoof neginraoof left a comment

Choose a reason for hiding this comment

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

Thanks! I added a few comments.

@houseroad houseroad self-requested a review June 22, 2020 06:02
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@neginraoof neginraoof 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!

@neginraoof
Copy link
Contributor

@yaeldekel
Test failures don't look related. Can you verify this?

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Could you reabse to the master and rerun the CI?

Copy link
Contributor

@neginraoof neginraoof Jul 10, 2020

Choose a reason for hiding this comment

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

Can we add attributes within the addNode c++ method?

Copy link
Member

Choose a reason for hiding this comment

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

Can we directly check the self's size instead of inserting IF-else block?

Copy link
Author

Choose a reason for hiding this comment

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

The size is not always available at export time, so we needed to add an if-else block.

@bzinodev bzinodev self-requested a review July 16, 2020 19:48
@houseroad houseroad self-requested a review July 30, 2020 17:10
Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Please resolve the conflict.

@houseroad
Copy link
Member

We still have conflict, could you rebase the PR to master? @yaeldekel

@houseroad
Copy link
Member

Could you please resolve the conflicts?

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@houseroad merged this pull request in 3c5e396.

@vadimkantorov
Copy link
Contributor

@yaeldekel Could you please explain the new behavior? Does it now emulate PyTorch behavior in ONNX? Does it now prohibit the squeeze(dim) on non-singleton dim from PyTorch?

@troymyname
Copy link

So...what's the outcome of this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export to ONNX of nop-squeeze errors out in ONNXRT