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

Function Conv2DGrad

tensorflow/core/ops/nn_grad.cc:140–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138REGISTER_OP_GRADIENT("CrossEntropy", CrossEntropyGrad);
139
140Status Conv2DGrad(const AttrSlice& attrs, FunctionDef* g) {
141 // clang-format off
142 *g = FDH::Define(
143 // Arg defs
144 {"input: T", "filter: T", "grad: T"},
145 // Ret val defs
146 {"input_grad: T", "filter_grad: T"},
147 // Attr defs
148 {"T: {float, double}",
149 "strides: list(int)",
150 "use_cudnn_on_gpu: bool = true",
151 GetPaddingAttrString(),
152 GetConvnetDataFormatAttrString()},
153 // Nodes
154 {
155 {{"i_shape"}, "Shape", {"input"}, {{"T", "$T"}}},
156 {{"input_grad"}, "Conv2DBackpropInput", {"i_shape", "filter", "grad"},
157 /*Attrs=*/{{"T", "$T"},
158 {"strides", "$strides"},
159 {"padding", "$padding"},
160 {"data_format", "$data_format"},
161 {"use_cudnn_on_gpu", "$use_cudnn_on_gpu"}}},
162
163 {{"f_shape"}, "Shape", {"filter"}, {{"T", "$T"}}},
164 {{"filter_grad"}, "Conv2DBackpropFilter", {"input", "f_shape", "grad"},
165 /*Attrs=*/{{"T", "$T"},
166 {"strides", "$strides"},
167 {"padding", "$padding"},
168 {"data_format", "$data_format"},
169 {"use_cudnn_on_gpu", "$use_cudnn_on_gpu"}}},
170 });
171 // clang-format on
172 return Status::OK();
173}
174REGISTER_OP_GRADIENT("Conv2D", Conv2DGrad);
175
176Status MaxPoolGrad(const AttrSlice& attrs, FunctionDef* g) {

Callers

nothing calls this directly

Calls 2

GetPaddingAttrStringFunction · 0.85

Tested by

no test coverage detected