mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
dnn(openvino): fix custom layers BlockingDesc
This commit is contained in:
parent
d9f66413ee
commit
74d0b4cc78
@ -204,14 +204,13 @@ public:
|
|||||||
std::vector<InferenceEngine::DataConfig> outDataConfig;
|
std::vector<InferenceEngine::DataConfig> outDataConfig;
|
||||||
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_2)
|
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_2)
|
||||||
InferenceEngine::SizeVector order;
|
InferenceEngine::SizeVector order;
|
||||||
size_t offset = std::numeric_limits<size_t>::max();
|
|
||||||
for (int i = 0; i < node->get_input_size(); ++i)
|
for (int i = 0; i < node->get_input_size(); ++i)
|
||||||
{
|
{
|
||||||
InferenceEngine::DataConfig conf;
|
InferenceEngine::DataConfig conf;
|
||||||
auto shape = node->input_value(i).get_shape();
|
auto shape = node->input_value(i).get_shape();
|
||||||
order.resize(shape.size());
|
order.resize(shape.size());
|
||||||
std::iota(order.begin(), order.end(), 0);
|
std::iota(order.begin(), order.end(), 0);
|
||||||
conf.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, shape, {shape, order, offset});
|
conf.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, shape, {shape, order});
|
||||||
inDataConfig.push_back(conf);
|
inDataConfig.push_back(conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +220,7 @@ public:
|
|||||||
auto shape = node->output(i).get_shape();
|
auto shape = node->output(i).get_shape();
|
||||||
order.resize(shape.size());
|
order.resize(shape.size());
|
||||||
std::iota(order.begin(), order.end(), 0);
|
std::iota(order.begin(), order.end(), 0);
|
||||||
conf.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, shape, {shape, order, offset});
|
conf.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, shape, {shape, order});
|
||||||
outDataConfig.push_back(conf);
|
outDataConfig.push_back(conf);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user