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] Bugfix #2326

Merged
merged 2 commits into from
Dec 24, 2018
Merged

Conversation

dominicsymes
Copy link
Contributor

Hello. I noticed a couple of problems while compiling an example with the tensorflow frontend module. The two small changes in the attached commit seem to fix the issues. One change is a simple rename of a dummy variable which was clashing with the function argument 'shape'. The second is to deal with the case of when a shrink axis operator produces a tensor with dimension zero - this does not seem to work with nnvm where the dimension must be at least one. I'd welcome any comments - particularly on whether this is the correct way to deal with the 0-dim result. Thanks.

@@ -646,6 +646,9 @@ def _transform_mask(stride_dim, ellipsis_mask):
pass
else:
final_output.append(out_shape[gather_index])
# Prevent 0-dim tensors which are not accepted by nnvm
Copy link
Contributor

Choose a reason for hiding this comment

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

@dominicsymes thanks for the change.
Please add a test case for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@srkreddy1238 thanks for taking a look.
I have added a test case that triggers strided slice with 0-dim output.

Copy link
Contributor

@srkreddy1238 srkreddy1238 left a comment

Choose a reason for hiding this comment

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

Thanks @dominicsymes . LGTM.

@tqchen tqchen merged commit e5d92e1 into apache:master Dec 24, 2018
FrozenGene pushed a commit to FrozenGene/tvm that referenced this pull request Dec 27, 2018
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
srkreddy1238 added a commit to srkreddy1238/tvm that referenced this pull request Mar 9, 2019
commit f347b52
Author: Yong Wu <yongwu@amazon.com>
    Get tags of saved model automatically

commit 916576c
Author: Zhi Chen <chzhi@amazon.com>
    Support TensorFlow saved model
    TF parser: return the consistent error message to error handler

commit f1782f3
Author: Yong Wu <yongwu@amazon.com>
    Add tf parser wrapper, infer shape automatically

commit 76188a4
Author: Siva <sivar.b@huawei.com>
    [NNVM][TENSORFLOW] bugfix. (apache#2444)

commit 6737739
Author: Ashutosh Parkhi <ashutosh.parkhi@imgtec.com>
    [Tensorflow] Support for Crop (apache#2285)

commit f6c3f99
Author: Alexey Romanov <alexey.v.romanov@gmail.com>
    [FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (apache#2242)

commit e5d92e1
Author: Dominic Symes <36929632+dominicsymes@users.noreply.github.com>
    [FRONTEND][TENSORFLOW] Bugfix (apache#2326)

commit 00d509d
Author: Alexey Romanov <alexey.v.romanov@gmail.com>
    [FRONTEND][TENSORFLOW] Support Unstack and Split (apache#2105)

commit df9d3ad
Author: Siva <sivar.b@huawei.com>
    [FRONTEND][TENSORFLOW] Bugfix (apache#2267)

commit d1a0c90
Author: Zhebin Jin <zhebin.jzb@alibaba-inc.com>
    [FRONTEND][TENSORFLOW]Add Split and realdiv op support (apache#2123)
    * Add Split and realdiv op support
    * Fix the pad calculation in the case of dilated convolution
srkreddy1238 added a commit to srkreddy1238/tvm that referenced this pull request Mar 9, 2019
commit f347b52
Author: Yong Wu <yongwu@amazon.com>
    Get tags of saved model automatically

commit 916576c
Author: Zhi Chen <chzhi@amazon.com>
    Support TensorFlow saved model
    TF parser: return the consistent error message to error handler

commit f1782f3
Author: Yong Wu <yongwu@amazon.com>
    Add tf parser wrapper, infer shape automatically

commit 76188a4
Author: Siva <sivar.b@huawei.com>
    [NNVM][TENSORFLOW] bugfix. (apache#2444)

commit 6737739
Author: Ashutosh Parkhi <ashutosh.parkhi@imgtec.com>
    [Tensorflow] Support for Crop (apache#2285)

commit f6c3f99
Author: Alexey Romanov <alexey.v.romanov@gmail.com>
    [FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (apache#2242)

commit e5d92e1
Author: Dominic Symes <36929632+dominicsymes@users.noreply.github.com>
    [FRONTEND][TENSORFLOW] Bugfix (apache#2326)

commit 00d509d
Author: Alexey Romanov <alexey.v.romanov@gmail.com>
    [FRONTEND][TENSORFLOW] Support Unstack and Split (apache#2105)

commit df9d3ad
Author: Siva <sivar.b@huawei.com>
    [FRONTEND][TENSORFLOW] Bugfix (apache#2267)

commit d1a0c90
Author: Zhebin Jin <zhebin.jzb@alibaba-inc.com>
    [FRONTEND][TENSORFLOW]Add Split and realdiv op support (apache#2123)
    * Add Split and realdiv op support
    * Fix the pad calculation in the case of dilated convolution
srkreddy1238 added a commit to srkreddy1238/tvm that referenced this pull request Mar 9, 2019
commit f347b52
Author: Yong Wu <yongwu@amazon.com>
    Get tags of saved model automatically

commit 916576c
Author: Zhi Chen <chzhi@amazon.com>
    Support TensorFlow saved model
    TF parser: return the consistent error message to error handler

commit f1782f3
Author: Yong Wu <yongwu@amazon.com>
    Add tf parser wrapper, infer shape automatically

commit 76188a4
Author: Siva <sivar.b@huawei.com>
    [NNVM][TENSORFLOW] bugfix. (apache#2444)

commit 6737739
Author: Ashutosh Parkhi <ashutosh.parkhi@imgtec.com>
    [Tensorflow] Support for Crop (apache#2285)

commit f6c3f99
Author: Alexey Romanov <alexey.v.romanov@gmail.com>
    [FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (apache#2242)

commit e5d92e1
Author: Dominic Symes <36929632+dominicsymes@users.noreply.github.com>
    [FRONTEND][TENSORFLOW] Bugfix (apache#2326)

commit 00d509d
Author: Alexey Romanov <alexey.v.romanov@gmail.com>
    [FRONTEND][TENSORFLOW] Support Unstack and Split (apache#2105)

commit df9d3ad
Author: Siva <sivar.b@huawei.com>
    [FRONTEND][TENSORFLOW] Bugfix (apache#2267)

commit d1a0c90
Author: Zhebin Jin <zhebin.jzb@alibaba-inc.com>
    [FRONTEND][TENSORFLOW]Add Split and realdiv op support (apache#2123)
    * Add Split and realdiv op support
    * Fix the pad calculation in the case of dilated convolution
srkreddy1238 added a commit to srkreddy1238/tvm that referenced this pull request Mar 11, 2019
commit 76188a4
Author: Siva sivar.b@huawei.com
[NNVM][TENSORFLOW] bugfix. (apache#2444)

commit 6737739
Author: Ashutosh Parkhi ashutosh.parkhi@imgtec.com
[Tensorflow] Support for Crop (apache#2285)

commit f6c3f99
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (apache#2242)

commit e5d92e1
Author: Dominic Symes 36929632+dominicsymes@users.noreply.github.com
[FRONTEND][TENSORFLOW] Bugfix (apache#2326)

commit 00d509d
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Support Unstack and Split (apache#2105)

commit df9d3ad
Author: Siva sivar.b@huawei.com
[FRONTEND][TENSORFLOW] Bugfix (apache#2267)

commit d1a0c90
Author: Zhebin Jin zhebin.jzb@alibaba-inc.com
[FRONTEND][TENSORFLOW]Add Split and realdiv op support (apache#2123)
* Add Split and realdiv op support
* Fix the pad calculation in the case of dilated convolution
srkreddy1238 added a commit to srkreddy1238/tvm that referenced this pull request Mar 12, 2019
commit 76188a4
Author: Siva sivar.b@huawei.com
[NNVM][TENSORFLOW] bugfix. (apache#2444)

commit 6737739
Author: Ashutosh Parkhi ashutosh.parkhi@imgtec.com
[Tensorflow] Support for Crop (apache#2285)

commit f6c3f99
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (apache#2242)

commit e5d92e1
Author: Dominic Symes 36929632+dominicsymes@users.noreply.github.com
[FRONTEND][TENSORFLOW] Bugfix (apache#2326)

commit 00d509d
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Support Unstack and Split (apache#2105)

commit df9d3ad
Author: Siva sivar.b@huawei.com
[FRONTEND][TENSORFLOW] Bugfix (apache#2267)

commit d1a0c90
Author: Zhebin Jin zhebin.jzb@alibaba-inc.com
[FRONTEND][TENSORFLOW]Add Split and realdiv op support (apache#2123)
* Add Split and realdiv op support
* Fix the pad calculation in the case of dilated convolution
srkreddy1238 added a commit that referenced this pull request Mar 19, 2019
* [FRONTEND][TENSORFLOW] Enhance with left over patches from NNVM.

commit 76188a4
Author: Siva sivar.b@huawei.com
[NNVM][TENSORFLOW] bugfix. (#2444)

commit 6737739
Author: Ashutosh Parkhi ashutosh.parkhi@imgtec.com
[Tensorflow] Support for Crop (#2285)

commit f6c3f99
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (#2242)

commit e5d92e1
Author: Dominic Symes 36929632+dominicsymes@users.noreply.github.com
[FRONTEND][TENSORFLOW] Bugfix (#2326)

commit 00d509d
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Support Unstack and Split (#2105)

commit df9d3ad
Author: Siva sivar.b@huawei.com
[FRONTEND][TENSORFLOW] Bugfix (#2267)

commit d1a0c90
Author: Zhebin Jin zhebin.jzb@alibaba-inc.com
[FRONTEND][TENSORFLOW]Add Split and realdiv op support (#2123)
* Add Split and realdiv op support
* Fix the pad calculation in the case of dilated convolution

* 	* review comments

* 	* resnet fix.

* 	* review comments
wweic pushed a commit to wweic/tvm that referenced this pull request Mar 20, 2019
…che#2757)

* [FRONTEND][TENSORFLOW] Enhance with left over patches from NNVM.

commit 76188a4
Author: Siva sivar.b@huawei.com
[NNVM][TENSORFLOW] bugfix. (apache#2444)

commit 6737739
Author: Ashutosh Parkhi ashutosh.parkhi@imgtec.com
[Tensorflow] Support for Crop (apache#2285)

commit f6c3f99
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (apache#2242)

commit e5d92e1
Author: Dominic Symes 36929632+dominicsymes@users.noreply.github.com
[FRONTEND][TENSORFLOW] Bugfix (apache#2326)

commit 00d509d
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Support Unstack and Split (apache#2105)

commit df9d3ad
Author: Siva sivar.b@huawei.com
[FRONTEND][TENSORFLOW] Bugfix (apache#2267)

commit d1a0c90
Author: Zhebin Jin zhebin.jzb@alibaba-inc.com
[FRONTEND][TENSORFLOW]Add Split and realdiv op support (apache#2123)
* Add Split and realdiv op support
* Fix the pad calculation in the case of dilated convolution

* 	* review comments

* 	* resnet fix.

* 	* review comments
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 20, 2019
…che#2757)

* [FRONTEND][TENSORFLOW] Enhance with left over patches from NNVM.

commit 76188a4
Author: Siva sivar.b@huawei.com
[NNVM][TENSORFLOW] bugfix. (apache#2444)

commit 6737739
Author: Ashutosh Parkhi ashutosh.parkhi@imgtec.com
[Tensorflow] Support for Crop (apache#2285)

commit f6c3f99
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Use input shapes directly instead of 1-element lists (apache#2242)

commit e5d92e1
Author: Dominic Symes 36929632+dominicsymes@users.noreply.github.com
[FRONTEND][TENSORFLOW] Bugfix (apache#2326)

commit 00d509d
Author: Alexey Romanov alexey.v.romanov@gmail.com
[FRONTEND][TENSORFLOW] Support Unstack and Split (apache#2105)

commit df9d3ad
Author: Siva sivar.b@huawei.com
[FRONTEND][TENSORFLOW] Bugfix (apache#2267)

commit d1a0c90
Author: Zhebin Jin zhebin.jzb@alibaba-inc.com
[FRONTEND][TENSORFLOW]Add Split and realdiv op support (apache#2123)
* Add Split and realdiv op support
* Fix the pad calculation in the case of dilated convolution

* 	* review comments

* 	* resnet fix.

* 	* review comments
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