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

[Relay][Dynamic] Add Dynamic Resize Op #6198

Merged
merged 9 commits into from
Aug 8, 2020

Conversation

mbrookhart
Copy link
Contributor

Thanks to @icemelon9 for some help debugging a unit test.

cc @zhiics @electriclilies

Copy link
Contributor

@electriclilies electriclilies left a comment

Choose a reason for hiding this comment

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

left some comments about docs / formatting stuff, but otherwise looks good to me!

@@ -239,6 +245,7 @@ def affine_grid(data, target_shape=None):
"""
return _make.affine_grid(data, target_shape)


Copy link
Contributor

Choose a reason for hiding this comment

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

Remove extra white space

Copy link
Contributor Author

@mbrookhart mbrookhart Aug 3, 2020

Choose a reason for hiding this comment

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

I ran Yapf on it, which inserted this line. Looking up Pep8 to be sure, we need two lines between top level functions in a module: https://www.python.org/dev/peps/pep-0008/#blank-lines

src/relay/op/dyn/image/resize.cc Show resolved Hide resolved
.add_argument("data", "Tensor", "The input tensor.")
.add_argument("size", "Tensor", "The output size tensor.")
.set_support_level(5)
.add_type_rel("DynResize", ResizeRel)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you decide to leave out the FInferCorrectLayout pass?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it isn't present in the static version either.

@zhiics
Copy link
Member

zhiics commented Aug 3, 2020

cc @yongwww

@mbrookhart mbrookhart force-pushed the mbrookhart/dynamic_resize branch from daf54b3 to d56b966 Compare August 3, 2020 20:29
@kevinthesun
Copy link
Contributor

Cool. We do need this to support TF RCNN models with dynamic image size. I'll update tf frontend after this is merged.

@mbrookhart mbrookhart force-pushed the mbrookhart/dynamic_resize branch from 1a4896c to 1cea338 Compare August 6, 2020 18:28
Copy link
Contributor

@kevinthesun kevinthesun left a comment

Choose a reason for hiding this comment

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

LGTM

@kevinthesun kevinthesun merged commit 9ad33fe into apache:master Aug 8, 2020
@kevinthesun
Copy link
Contributor

Thanks @mbrookhart @electriclilies @zhiics

wjliu1998 pushed a commit to wjliu1998/incubator-tvm that referenced this pull request Aug 13, 2020
* WIP

* optionally remove output shape inference from topi

* fix resize

* add resize to dynamic_to_static pass

add resize to dynamic_to_static pass

* fix clang-format

* fix bad rebase

* add argument to dynamic resize doc string

* fix i386 test

* fix lint
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
* WIP

* optionally remove output shape inference from topi

* fix resize

* add resize to dynamic_to_static pass

add resize to dynamic_to_static pass

* fix clang-format

* fix bad rebase

* add argument to dynamic resize doc string

* fix i386 test

* fix lint
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
* WIP

* optionally remove output shape inference from topi

* fix resize

* add resize to dynamic_to_static pass

add resize to dynamic_to_static pass

* fix clang-format

* fix bad rebase

* add argument to dynamic resize doc string

* fix i386 test

* fix lint
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
* WIP

* optionally remove output shape inference from topi

* fix resize

* add resize to dynamic_to_static pass

add resize to dynamic_to_static pass

* fix clang-format

* fix bad rebase

* add argument to dynamic resize doc string

* fix i386 test

* fix lint
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
* WIP

* optionally remove output shape inference from topi

* fix resize

* add resize to dynamic_to_static pass

add resize to dynamic_to_static pass

* fix clang-format

* fix bad rebase

* add argument to dynamic resize doc string

* fix i386 test

* fix lint
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
* WIP

* optionally remove output shape inference from topi

* fix resize

* add resize to dynamic_to_static pass

add resize to dynamic_to_static pass

* fix clang-format

* fix bad rebase

* add argument to dynamic resize doc string

* fix i386 test

* fix lint
@mbrookhart mbrookhart deleted the mbrookhart/dynamic_resize branch December 3, 2020 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants