mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
Determine layout
This commit is contained in:
parent
0689c70dba
commit
94533e12eb
@ -769,8 +769,14 @@ static InferenceEngine::Layout estimateLayout(const Mat& m)
|
|||||||
{
|
{
|
||||||
if (m.dims == 4)
|
if (m.dims == 4)
|
||||||
return InferenceEngine::Layout::NCHW;
|
return InferenceEngine::Layout::NCHW;
|
||||||
|
else if (m.dims == 3)
|
||||||
|
return InferenceEngine::Layout::CHW;
|
||||||
else if (m.dims == 2)
|
else if (m.dims == 2)
|
||||||
return InferenceEngine::Layout::NC;
|
return InferenceEngine::Layout::NC;
|
||||||
|
else if (m.dims == 1)
|
||||||
|
return InferenceEngine::Layout::C;
|
||||||
|
else if (m.dims == 5)
|
||||||
|
return InferenceEngine::Layout::NCDHW;
|
||||||
else
|
else
|
||||||
return InferenceEngine::Layout::ANY;
|
return InferenceEngine::Layout::ANY;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user