fix conv_op bug

tonyyang-svail-patch-1
chengduoZH 7 years ago
parent 4948f7b3fe
commit b5c920920c

@ -55,7 +55,7 @@ void ConvOp::InferShape(framework::InferShapeContext* ctx) const {
std::vector<int64_t> output_shape({in_dims[0], filter_dims[0]});
for (size_t i = 0; i < strides.size(); ++i) {
PADDLE_ENFORCE(in_dims[i + 2] + 2 * paddings[i] -
(dilations[i] * (filter_dims[i + 2] - 1) + 1) >
(dilations[i] * (filter_dims[i + 2] - 1) + 1) >=
0,
"Due to the settings of paddings, filter_dims and "
"dilations, the output size is less than 0, please check "

Loading…
Cancel
Save