Parse repeated values of ConvolutionParameter

pull/11295/head
Dmitry Kurtaev 7 years ago
parent 070ec313f2
commit 512632e574
  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