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][Frontend] Implement SpaceToBatchND in Tensorflow frontend #2943

Merged
merged 1 commit into from
Apr 12, 2019

Conversation

alexeyr
Copy link
Contributor

@alexeyr alexeyr commented Apr 1, 2019

Adds a missing auxiliary operation used for dilated pooling and convolutions.

@alexeyr
Copy link
Contributor Author

alexeyr commented Apr 1, 2019

@srkreddy1238 Please review

@alexeyr alexeyr changed the title Implement SpaceToBatchND in Tensorflow frontend [Relay][Frontend] Implement SpaceToBatchND in Tensorflow frontend Apr 1, 2019
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 @alexeyr for adding this op.

Can you add few test cases to non zero values for padding ?

You may add the test cases directly from https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/space-to-batch-n-d too.

@alexeyr alexeyr force-pushed the SpaceToBatchND branch 3 times, most recently from 50116f0 to 558e246 Compare April 8, 2019 14:08
@alexeyr
Copy link
Contributor Author

alexeyr commented Apr 8, 2019

@srkreddy1238 I've added the tests based on these examples and TF tests. I believe there is a typo in one of the TF examples: tensorflow/tensorflow#27638.

@alexeyr
Copy link
Contributor Author

alexeyr commented Apr 9, 2019

@srkreddy1238 Actually, now that I know BatchToSpaceND exists, might as well add it too. I'll try to do it today.

@alexeyr
Copy link
Contributor Author

alexeyr commented Apr 9, 2019

@srkreddy1238 Would you object to:

  1. Automatically detecting all test_ functions in the __main__ section so we can't forget to add them (as I did here initially);
  2. Modifying compare_tf_to_tvm signature so you don't need to handle names explicitly?

@srkreddy1238
Copy link
Contributor

srkreddy1238 commented Apr 9, 2019

  1. Automatically detecting all test_ functions in the __main__ section so we can't forget to add them (as I did here initially);

The main is only for local execution as CI runs with nose. Any welcome to make this change.

  1. Modifying compare_tf_to_tvm signature so you don't need to handle names explicitly?

Name handling is good as it's important to make sure that Input and output names being untouched from original Tensorflow graph. Advice to leave it as it is for now.

[[13], [14], [15], [16]]]],
block_shape=[2, 2],
paddings=[[0, 0], [0, 0]],
desired=[[[[1], [3]], [[9], [11]]],
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you compute the desired from TF API instead ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I've made this change already, just not pushed yet.

@alexeyr
Copy link
Contributor Author

alexeyr commented Apr 9, 2019

The main is only for local execution as CI runs with nose. Any welcome to make this change.

Ah, ok, then I don't need to worry about it. Still will probably do it just to make clear.

Name handling is good as it's important to make sure that Input and output names being untouched from original Tensorflow graph. Advice to leave it as it is for now.

I think this could be handled entirely within the test and not exposed. But will leave for now, as you suggest.

@alexeyr
Copy link
Contributor Author

alexeyr commented Apr 9, 2019

@srkreddy1238 Added BatchToSpaceND.

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.

LGTM

@srkreddy1238 srkreddy1238 merged commit ab890d6 into apache:master Apr 12, 2019
@alexeyr alexeyr deleted the SpaceToBatchND branch April 15, 2019 07:10
wweic pushed a commit to wweic/tvm that referenced this pull request May 13, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request May 13, 2019
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