1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Determine layout

original commit: 94533e12eb
This commit is contained in:
Liubov Batanina
2021-03-04 13:05:01 +03:00
committed by Alexander Alekhin
parent 0fe0a0237a
commit fd5337d532
+6
View File
@@ -772,8 +772,14 @@ static InferenceEngine::Layout estimateLayout(const Mat& m)
{
if (m.dims == 4)
return InferenceEngine::Layout::NCHW;
else if (m.dims == 3)
return InferenceEngine::Layout::CHW;
else if (m.dims == 2)
return InferenceEngine::Layout::NC;
else if (m.dims == 1)
return InferenceEngine::Layout::C;
else if (m.dims == 5)
return InferenceEngine::Layout::NCDHW;
else
return InferenceEngine::Layout::ANY;
}