提交 83d7ceab authored 作者: affanv14's avatar affanv14

add check to see number of filters is divisible be num_groups

上级 08e30e1d
......@@ -184,6 +184,11 @@ PyArrayObject* corr3dMM(PyArrayObject* bottom,
"Corr3dMM images and kernel must have the same stack size\n");
return NULL;
}
if ((nFilters %% numgroups) != 0) {
PyErr_SetString(PyExc_ValueError,
"CorrMM the number of filters must be divisible by the number of groups\n");
return NULL;
}
// implicit dilated filter
const int dil_kH = (kH - 1) * dilH + 1;
const int dil_kW = (kW - 1) * dilW + 1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论