diff --git a/paddle/function/DepthwiseConvOp.cpp b/paddle/function/DepthwiseConvOp.cpp index 9180c19b118251b8312a32355fcd1917133a9d10..21084bedb44dd1ed4f0db85f0dd1330d94713fd8 100644 --- a/paddle/function/DepthwiseConvOp.cpp +++ b/paddle/function/DepthwiseConvOp.cpp @@ -125,6 +125,7 @@ public: size_t outputHeight = output[2]; size_t outputWidth = output[3]; size_t filterMultiplier = outputChannels / groups_; + CHECK_EQ(inputChannels, groups_); real* inputData = inputs[0].data(); real* filterData = inputs[1].data(); @@ -187,6 +188,7 @@ public: size_t outputHeight = output[2]; size_t outputWidth = output[3]; size_t filterMultiplier = outputChannels / groups_; + CHECK_EQ(inputChannels, groups_); real* outputGrad = inputs[0].data(); real* filterData = inputs[1].data(); @@ -248,6 +250,7 @@ public: size_t outputHeight = output[2]; size_t outputWidth = output[3]; size_t filterMultiplier = outputChannels / groups_; + CHECK_EQ(inputChannels, groups_); real* outputGrad = inputs[0].data(); real* inputData = inputs[1].data();