Support Reshape with zero dim

This commit is contained in:
Liubov Batanina 2020-08-31 12:52:55 +03:00
parent 7495a4722f
commit 2349a09736

View File

@ -335,6 +335,10 @@ void ONNXImporter::populateNet(Net dstNet)
{
inpShape[j] = tensorShape.dim(j).dim_value();
}
if (!inpShape.empty())
{
inpShape[0] = std::max(inpShape[0], 1); // It's OK to have undetermined batch size
}
outShapes[valueInfoProto.name()] = inpShape;
}