MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MaxPoolGradGrad

Function MaxPoolGradGrad

tensorflow/core/ops/nn_grad.cc:233–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231REGISTER_OP_GRADIENT("AvgPool", AvgPoolGrad);
232
233Status MaxPoolGradGrad(const AttrSlice& attrs, FunctionDef* g) {
234 // clang-format off
235 *g = FDH::Define(
236 // Arg defs
237 {"input: T", "grad: T"},
238 // Ret val defs
239 {"output: T"},
240 // Attr defs
241 {"T: {float, half} = DT_FLOAT",
242 "ksize: list(int) >= 4",
243 "strides: list(int) >= 4",
244 GetPaddingAttrString()},
245 // Nodes
246 {
247 // Invoke MaxPool again to recompute the outputs (removed by CSE?).
248 {{"maxpool"}, "MaxPool", {"input"},
249 /*Attrs=*/{{"T", "$T"},
250 {"ksize", "$ksize"},
251 {"strides", "$strides"},
252 {"padding", "$padding"}}},
253 {{"output"}, "MaxPoolGradGrad", {"input", "maxpool", "grad"},
254 /*Attrs=*/{{"T", "$T"},
255 {"ksize", "$ksize"},
256 {"strides", "$strides"},
257 {"padding", "$padding"}}}
258 });
259 // clang-format on
260 return Status::OK();
261}
262REGISTER_OP_GRADIENT("MaxPoolGrad", MaxPoolGradGrad);
263
264Status BiasAddGrad(const AttrSlice& attrs, FunctionDef* g) {

Callers 1

CreateSimpleMaxPoolGradFunction · 0.50

Calls 1

GetPaddingAttrStringFunction · 0.85

Tested by 1

CreateSimpleMaxPoolGradFunction · 0.40