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

Function AvgPoolGrad

tensorflow/core/ops/nn_grad.cc:207–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205REGISTER_OP_GRADIENT("MaxPool", MaxPoolGrad);
206
207Status AvgPoolGrad(const AttrSlice& attrs, FunctionDef* g) {
208 // clang-format off
209 *g = FDH::Define(
210 // Arg defs
211 {"input: T", "grad: T"},
212 // Ret val defs
213 {"output: T"},
214 // Attr defs
215 {"T: {float, half} = DT_FLOAT",
216 "ksize: list(int) >= 4",
217 "strides: list(int) >= 4",
218 GetPaddingAttrString()},
219 // Nodes
220 {
221 {{"i_shape"}, "Shape", {"input"}, {{"T", "$T"}}},
222 {{"output"}, "AvgPoolGrad", {"i_shape", "grad"},
223 /*Attrs=*/{{"T", "$T"},
224 {"ksize", "$ksize"},
225 {"strides", "$strides"},
226 {"padding", "$padding"}}}
227 });
228 // clang-format on
229 return Status::OK();
230}
231REGISTER_OP_GRADIENT("AvgPool", AvgPoolGrad);
232
233Status MaxPoolGradGrad(const AttrSlice& attrs, FunctionDef* g) {

Callers 1

AvgPoolGradHelperFunction · 0.50

Calls 1

GetPaddingAttrStringFunction · 0.85

Tested by

no test coverage detected