Skip to content

[Relay] Add gradient for reshape#3901

Merged
jroesch merged 1 commit intoapache:masterfrom
MarisaKirisame:reshape-grad
Sep 6, 2019
Merged

[Relay] Add gradient for reshape#3901
jroesch merged 1 commit intoapache:masterfrom
MarisaKirisame:reshape-grad

Conversation

@MarisaKirisame
Copy link
Contributor

Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers.
@SWu @vinx13 @Ruinhuang can you guys help review?

assert zz.checked_type == relay.ty.TensorType(oshape, "float32")

func = relay.Function([x], z)
check_grad(func)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be a good idea to separate this test out since gradient is implemented separately from the op

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This allow us to get the same coverage for both test_op_level3 and test_op_grad_level3. I think we should move toward this style.

Copy link
Contributor

Choose a reason for hiding this comment

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

True. I think grad implementations could also use some refactoring to move around; it would be more convenient implementation-wise to put grad implementations next to their forward op implementations as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That also sounds good. Tensor_grad is getting big.

@jroesch jroesch merged commit 02ddb5a into apache:master Sep 6, 2019
MarisaKirisame added a commit to MarisaKirisame/tvm that referenced this pull request Sep 7, 2019
wweic pushed a commit to wweic/tvm that referenced this pull request Sep 16, 2019
wweic pushed a commit to wweic/tvm that referenced this pull request Sep 16, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Sep 16, 2019
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.

3 participants