Skip to content

Conversation

@yongwww
Copy link
Member

@yongwww yongwww commented Mar 31, 2019

Add Gather support
Note: comment test case since Gather was used in tf.__version__ <= 1.6
I have to comment test case since the test env is using latest tf, Gather is not in graphdef, if the pr is not acceptable, i will close it soon

@srkreddy1238 @kazum @wweic @zhiics

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

LGTM


compare_tf_with_tvm([np_data, np_indices], ['in_data:0', 'indices:0'], 'Gather:0')

def test_forward_gather_v1():
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def test_forward_gather_v1():
from nose.tools import nottest
@nottest
def test_forward_gather_v1():

This will skip the unit test. Integ test is failing because it's running your test.

Copy link
Member Author

Choose a reason for hiding this comment

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

how about adding if condition for the test? if int(tf.__version__.split('.')[1]) <= 6:

Copy link
Contributor

Choose a reason for hiding this comment

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

'Taxis', '_class'])(new_input, attr)
return _impl

def _gather_v1():
Copy link
Contributor

Choose a reason for hiding this comment

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

Both versions share almost same logic across.
Advice to differ on axis based on inputs count or an argument.

#######################################################################
# Gather
# Gather, GatherV2
# ------
Copy link
Contributor

Choose a reason for hiding this comment

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

Underline up to the text pls.

test_forward_crop()
test_forward_pad()
test_forward_gather()
# Gather was used in tf 1.6 and before
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't work with nose execution. Add this version check inside test_forward_gather_v1.

@yongwww
Copy link
Member Author

yongwww commented Apr 2, 2019

@srkreddy1238 fixed all comments, CI passed, pls take another look

@srkreddy1238 srkreddy1238 merged commit 38151ab into apache:master Apr 3, 2019
@srkreddy1238
Copy link
Contributor

Thanks @yongwww @wweic and @zhiics . This is now merged.

wweic pushed a commit to wweic/tvm that referenced this pull request Apr 7, 2019
* [Relay][Frontend] Support TF Gather

* fix comments
wweic pushed a commit to wweic/tvm that referenced this pull request Apr 7, 2019
* [Relay][Frontend] Support TF Gather

* fix comments
wweic pushed a commit to wweic/tvm that referenced this pull request Apr 8, 2019
* [Relay][Frontend] Support TF Gather

* fix comments
wweic pushed a commit to wweic/tvm that referenced this pull request Apr 10, 2019
* [Relay][Frontend] Support TF Gather

* fix comments
wweic pushed a commit to neo-ai/tvm that referenced this pull request Apr 11, 2019
* [Relay][Frontend] Support TF Gather

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