File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -242,28 +242,6 @@ void DepthwiseConv2dKernel(const Context& dev_ctx,
242
242
std::vector<int > dilation = dilations_in;
243
243
244
244
const bool channel_last = data_format == " NHWC" ;
245
- if (channel_last) {
246
- PADDLE_ENFORCE_EQ (
247
- out->dims ()[out->dims ().size () - 1 ],
248
- input.dims ()[input.dims ().size () - 1 ],
249
- phi::errors::InvalidArgument (
250
- " ShapeError: The output channels must be equal to the "
251
- " input channels. But receivced output channel number is %d "
252
- " and input channel number is %d" ,
253
- out->dims ()[out->dims ().size () - 1 ],
254
- input.dims ()[input.dims ().size () - 1 ]));
255
- } else {
256
- PADDLE_ENFORCE_EQ (
257
- out->dims ()[1 ],
258
- input.dims ()[1 ],
259
- phi::errors::InvalidArgument (
260
- " ShapeError: The output channels must be equal to the "
261
- " input channels. But receivced output channel number is %d "
262
- " and input channel number is %d" ,
263
- out->dims ()[1 ],
264
- input.dims ()[1 ]));
265
- }
266
-
267
245
auto in_dims = input.dims ();
268
246
auto filter_dims = filter.dims ();
269
247
phi::DDim in_data_dims;
You can’t perform that action at this time.
0 commit comments