Commit 0a35b97e authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #16070 from dkurt:backport_15611

parents eea517be 134094a4
...@@ -2772,7 +2772,9 @@ struct Net::Impl ...@@ -2772,7 +2772,9 @@ struct Net::Impl
{ {
std::vector<LayerPin>& inputLayerIds = layers[id].inputBlobsId; std::vector<LayerPin>& inputLayerIds = layers[id].inputBlobsId;
if (inOutShapes[0].in[0].empty() && !layers[0].outputBlobs.empty()) if (id == 0 && inOutShapes[id].in[0].empty())
{
if (!layers[0].outputBlobs.empty())
{ {
ShapesVec shapes; ShapesVec shapes;
for (int i = 0; i < layers[0].outputBlobs.size(); i++) for (int i = 0; i < layers[0].outputBlobs.size(); i++)
...@@ -2783,6 +2785,12 @@ struct Net::Impl ...@@ -2783,6 +2785,12 @@ struct Net::Impl
} }
inOutShapes[0].in = shapes; inOutShapes[0].in = shapes;
} }
else
{
inOutShapes[0].out.clear();
return;
}
}
if (inOutShapes[id].in.empty()) if (inOutShapes[id].in.empty())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment