[Relay][Frontend] Support TF Gather#2935
Conversation
|
|
||
| compare_tf_with_tvm([np_data, np_indices], ['in_data:0', 'indices:0'], 'Gather:0') | ||
|
|
||
| def test_forward_gather_v1(): |
There was a problem hiding this comment.
| 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.
There was a problem hiding this comment.
how about adding if condition for the test? if int(tf.__version__.split('.')[1]) <= 6:
There was a problem hiding this comment.
sounds good. Checkout out an example: https://github.com/dmlc/tvm/blob/5f37cc1290355c840e36ba3a4a7ff158a97896c5/tests/python/contrib/test_nnpack.py#L20-L21
| 'Taxis', '_class'])(new_input, attr) | ||
| return _impl | ||
|
|
||
| def _gather_v1(): |
There was a problem hiding this comment.
Both versions share almost same logic across.
Advice to differ on axis based on inputs count or an argument.
| ####################################################################### | ||
| # Gather | ||
| # Gather, GatherV2 | ||
| # ------ |
There was a problem hiding this comment.
Underline up to the text pls.
| test_forward_crop() | ||
| test_forward_pad() | ||
| test_forward_gather() | ||
| # Gather was used in tf 1.6 and before |
There was a problem hiding this comment.
This doesn't work with nose execution. Add this version check inside test_forward_gather_v1.
|
@srkreddy1238 fixed all comments, CI passed, pls take another look |
* [Relay][Frontend] Support TF Gather * fix comments
* [Relay][Frontend] Support TF Gather * fix comments
* [Relay][Frontend] Support TF Gather * fix comments
* [Relay][Frontend] Support TF Gather * fix comments
* [Relay][Frontend] Support TF Gather * fix comments
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