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

[Frontend][TENSORFLOW] Add support for unpack with dim 0 after tensorlist stack #8558

Merged
merged 2 commits into from
Jul 28, 2021

Conversation

zxy844288792
Copy link
Contributor

In current unpack implementation:

if axis_length < 0:

Any() is not supported and in some tf2 models from tf model hub like ssd_mobilenet_v2, we encounter some cases when unpack is after a tensorlist stack node. And the output for tensorlist stack will have any() in its dimension 0: .
In this case it will not supported.

This pr adds support by introducing an special case handling, when we know the tensorlist stack node input only contains one element, it will have output shape with 1 in dimension 0.

python/tvm/relay/prelude.py Outdated Show resolved Hide resolved
python/tvm/relay/prelude.py Outdated Show resolved Hide resolved
python/tvm/relay/prelude.py Outdated Show resolved Hide resolved
python/tvm/relay/prelude.py Outdated Show resolved Hide resolved
python/tvm/relay/prelude.py Outdated Show resolved Hide resolved
python/tvm/relay/prelude.py Outdated Show resolved Hide resolved
Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM

trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jul 26, 2021
* enable testcase when tensorlist stack follows by a unpack for dim 0

* address reviews and improve the docstring
@tqchen tqchen merged commit 496f10b into apache:main Jul 28, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
…list stack (apache#8558)

* enable testcase when tensorlist stack follows by a unpack for dim 0

* address reviews and improve the docstring
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
…list stack (apache#8558)

* enable testcase when tensorlist stack follows by a unpack for dim 0

* address reviews and improve the docstring
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.

3 participants