Skip to content

Conv2DGrad & MaxPoolGradHelper - #12665

Merged
yifeif merged 2 commits into
tensorflow:masterfrom
bpiel:conv2d_maxpool_grads
Sep 7, 2017
Merged

yifeif merged 2 commits into
tensorflow:masterfrom
bpiel:conv2d_maxpool_grads

Conversation

@bpiel

@bpiel bpiel commented Aug 28, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@mention-bot

Copy link
Copy Markdown

@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,

Copy link
Copy Markdown

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
Copy Markdown
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.

@suharshs suharshs left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks!

@bpiel

bpiel commented Aug 31, 2017

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Member

Jenkins, test this please.

@dguerra

dguerra commented Sep 7, 2017

Copy link
Copy Markdown

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

@martinwicke

Copy link
Copy Markdown
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