-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[Relay] Conv2d grad #3636
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] Conv2d grad #3636
Conversation
fc66ed8
to
d365466
Compare
5a0ced6
to
1b77b72
Compare
How is the numerical gradient going? |
@MarisaKirisame I disabled numerical tests for now |
dont stress about it. It might be an error with numerical test. |
788a2ad
to
e1f0bdc
Compare
I tried playing around with this PR but I'm getting:
Is there something I need to call to populate |
@SWu You need to call |
return f(e); | ||
auto ret = f(e); | ||
ret->checked_type_ = t; | ||
return ret; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarisaKirisame please review this change
@vinx13 I am calling InferType pass on the function before gradient pass, but it doesn't seem to make a difference (for what it's worth, I'm using |
@SWu I have updated the gradient pass here, that will copy the checked type before calling the registered gradient function. Have you tried the test case here? If your code is different from the test case, can you share your script and I can take a look? |
@vinx13 I think I narrowed it down |
@MarisaKirisame what do you think is the best way to set the type of |
@MarisaKirisame The problem is we don't have access to the original call in this function (this is |
@vinx13 it is easily solved by requiring the lambda return to take an extra argument. type. |
If the supporting infra for non first order is not quite ready yet, let's keep first order for now. |
9229983
to
6833eca
Compare
Also CC @zhiics if you have time |
@junrushao1994 Sure. Will do it today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if assigning the type directly is the best way because my impression is that the type should be retained somehow.
Otherwise, LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't object to assigning checked_type
directly if there is no other way to do it.
@jroesch I want your input with changing the type directly. |
@junrushao1994 @vinx13 can you guys wait a bit before getting this merged? I am a bit hesitant about writing the type directly and want to think about it a bit. |
@MarisaKirisame not a hurry, we are hesitant as well |
Is there any update? |
@junrushao1994 I will talk with jared today. |
@junrushao1994 it is ok. |
Okay, I think we can now merge. @vinx13 Should we rebase to retrigger the CI since this PR has been here for a while? |
6833eca
to
86c1805
Compare
86c1805
to
1c3bd84
Compare
* [Relay] Conv2d grad * Fix test * Fix first order gradient
* [Relay] Conv2d grad * Fix test * Fix first order gradient
* [Relay] Conv2d grad * Fix test * Fix first order gradient
No description provided.