Merge pull request #11295 from dkurt:dnn_repeated_conv_params

pull/11302/head
Vadim Pisarevsky 7 years ago
commit 0b9d075958
  1. 15
      modules/dnn/src/layers/layers_common.cpp

@ -77,7 +77,20 @@ bool getParameter(const LayerParams &params, const std::string& nameBase, const
{
if (params.has(nameAll_))
{
parameterH = parameterW = params.get<int>(nameAll_);
DictValue param = params.get(nameAll_);
parameterH = param.get<int>(0);
if (param.size() == 1)
{
parameterW = parameterH;
}
else if (param.size() == 2)
{
parameterW = param.get<int>(1);
}
else
{
return false;
}
return true;
}
else

Loading…
Cancel
Save