Skip to content

Commit

Permalink
Refactoring after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
SeptimiuIoachimNeagaIntel committed Nov 5, 2024
1 parent 97f7c1a commit b775841
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ struct convert<OpenVINOParams> {
}

if (node["reshape"]) {
params.reshape = node["reshape"].as<LayerVariantAttr<std::vector<uint64_t>>> ();
params.reshape = node["reshape"].as<LayerVariantAttr<std::vector<size_t>>> ();
}

if (node["config"]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct OpenVINOParams {
LayerVariantAttr<std::string> output_layout;
LayerVariantAttr<std::string> input_model_layout;
LayerVariantAttr<std::string> output_model_layout;
LayerVariantAttr<std::vector<uint64_t>> reshape;
LayerVariantAttr<std::vector<size_t>> reshape;
std::map<std::string, std::string> config;
size_t nireq = 1u;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void cfgOutputPostproc(ov::preprocess::PrePostProcessor& ppp, const std::
}

static void cfgReshape(const std::shared_ptr<ov::Model>& model,
const AttrMap<std::vector<uint64_t>> shape_map) {
const AttrMap<std::vector<size_t>> shape_map) {
std::map<std::string, ov::PartialShape> partial_shapes;
for (const auto& [layer_name, shape] : shape_map) {
partial_shapes.emplace(layer_name, shape);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ static cv::gapi::GNetPackage getNetPackage(const std::string& tag, const OpenVIN
const auto& blob_path = std::get<OpenVINOParams::BlobPath>(params.path);
network = std::make_unique<P>(tag, blob_path.blob, params.device);
}
if (std::holds_alternative<AttrMap<std::vector<uint64_t>>>(params.reshape)) {
network->cfgReshape(std::get<AttrMap<std::vector<uint64_t>>>(params.reshape));
if (std::holds_alternative<AttrMap<std::vector<size_t>>>(params.reshape)) {
network->cfgReshape(std::get<AttrMap<std::vector<size_t>>>(params.reshape));
} else {
network->cfgReshape(std::get<std::vector<uint64_t>>(params.reshape));
network->cfgReshape(std::get<std::vector<size_t>>(params.reshape));
}

network->cfgPluginConfig(params.config);
Expand Down

0 comments on commit b775841

Please sign in to comment.