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

Conv2DGrad & MaxPoolGradHelper #12665

Merged
merged 2 commits into from
Sep 7, 2017
Merged

Conversation

bpiel
Copy link
Contributor

@bpiel bpiel commented Aug 28, 2017

Gradients for the nn ops, Conv2D and MaxPool. Ported from python:

@ops.RegisterGradient("Conv2D")

These are simple enough that I grouped them into a single PR. I can split into two, if necessary.

cc @suharshs @dguerra

@tensorflow-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@mention-bot
Copy link

@bpiel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tensorflower-gardener, @DeNeutoy and @vrv to be potential reviewers.

@suharshs suharshs self-requested a review August 29, 2017 16:36
}
REGISTER_GRADIENT_OP("Conv2D", Conv2DGrad);

Status MaxPoolGradHelper(const Scope& scope, const Operation& op,

Choose a reason for hiding this comment

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

I am not sure what the status of MaxPool and MaxPoolV2 is, but my guess is that MaxPoolV2 is the one more commonly used now. You may want to also add that gradient

@ops.RegisterGradient("MaxPoolV2")

If you feel like it you can add MaxPoolGradGrad and MaxPoolGradGradV2, but I doubt these are blocking your models.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, didn't know about MaxPoolV2. Added it.

Copy link

@suharshs suharshs left a comment

Choose a reason for hiding this comment

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

Thanks!

@bpiel
Copy link
Contributor Author

bpiel commented Aug 31, 2017

should this get merged? Just worried about the branch becoming in conflict with master

@suharshs suharshs assigned suharshs and martinwicke and unassigned suharshs Aug 31, 2017
@martinwicke
Copy link
Member

Jenkins, test this please.

@martinwicke
Copy link
Member

@martinwicke
Copy link
Member

@dguerra
Copy link

dguerra commented Sep 7, 2017

What's the difference between MaxPool and MaxPoolV2? Should it be used one over the other?

@martinwicke
Copy link
Member

We (almost) never change ops, whenever we have to, we instead introduce a new V2 (or V3, or V4) op. That makes sure that old serialized graphdefs keep working.

So in your code, use V2, it's the newest version.

@yifeif yifeif merged commit bcafcee into tensorflow:master Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants