Skip to content

[Relay][Frontend][TFlite] Add parses support for SLICE - #4502

Merged
tqchen merged 2 commits into
apache:masterfrom
inadob:slice
Jan 10, 2020
Merged

[Relay][Frontend][TFlite] Add parses support for SLICE#4502
tqchen merged 2 commits into
apache:masterfrom
inadob:slice

Conversation

@inadob

@inadobinadob commented Dec 11, 2019

Copy link
Copy Markdown
Contributor
  • TFlite 1.13: convertor gives nonsense output when size[i]==-1
  • TF parser: SLICE needs fixing for size[i]==-1 -> the formula for calculating the end indices needs to be changed to
    if size[i] == -1:
    end[i] = data_shape[i] - begin[i] + 1

@inadob

Copy link
Copy Markdown
ContributorAuthor

@kevinthesun@FrozenGene can you please review this patch

Comment threadpython/tvm/relay/frontend/tflite.py Outdated
Comment threadtests/python/frontend/tflite/test_forward.py
* TFlite 1.13: convertor gives nonsense output when size[i]==-1
* TF parser: SLICE need fixing for size[i]==-1 -> gives wrong output
bcs of indices

@FrozenGeneFrozenGene left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@kevinthesunkevinthesun self-assigned this Dec 17, 2019
@kevinthesunkevinthesun added the status: need update need update based on feedbacks label Dec 18, 2019
* Add another test to cover size=-1 case
@tqchen
tqchen merged commit 2327bb9 into apache:masterJan 10, 2020
@tqchentqchen added status: accepted and removed status: need update need update based on feedbacks labels Jan 10, 2020
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 26, 2020
* [Relay][Frontend][TFlite] Add parses support for SLICE
* TFlite 1.13: convertor gives nonsense output when size[i]==-1
* TF parser: SLICE need fixing for size[i]==-1 -> gives wrong output
bcs of indices
* Set end[i] = input_tensor_shape[i] as suggested in PR review
* Add another test to cover size=-1 case
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 28, 2020
* [Relay][Frontend][TFlite] Add parses support for SLICE
* TFlite 1.13: convertor gives nonsense output when size[i]==-1
* TF parser: SLICE need fixing for size[i]==-1 -> gives wrong output
bcs of indices
* Set end[i] = input_tensor_shape[i] as suggested in PR review
* Add another test to cover size=-1 case
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2020
* [Relay][Frontend][TFlite] Add parses support for SLICE
* TFlite 1.13: convertor gives nonsense output when size[i]==-1
* TF parser: SLICE need fixing for size[i]==-1 -> gives wrong output
bcs of indices
* Set end[i] = input_tensor_shape[i] as suggested in PR review
* Add another test to cover size=-1 case
Sign up for freeto 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.

4 participants

@inadob@tqchen@FrozenGene@kevinthesun