From 3bc2c46693de0e5d14666068b069d00a196e0786 Mon Sep 17 00:00:00 2001 From: Daria Mityagina Date: Wed, 9 Jun 2021 16:27:52 +0300 Subject: [PATCH] [IE][VPU] Yolo_v5 support (#5976) Changing the threshold for VPU scales --- .../src/middleend/passes/weights_analysis.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inference-engine/src/vpu/graph_transformer/src/middleend/passes/weights_analysis.cpp b/inference-engine/src/vpu/graph_transformer/src/middleend/passes/weights_analysis.cpp index 213e06ee1f5..27e703ec4f5 100644 --- a/inference-engine/src/vpu/graph_transformer/src/middleend/passes/weights_analysis.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/middleend/passes/weights_analysis.cpp @@ -92,7 +92,7 @@ bool checkGrowingOutput(const Model& model) { return false; } - static const float SCALE_THRESHOLD = 0.125f; + static const float SCALE_THRESHOLD = 0.1f; for (const auto& stage : model->getStages()) { if (stage->type() != StageType::Power && @@ -248,14 +248,13 @@ void PassImpl::run(const Model& model) { if (firstStage && shift < 4 && isGrowingOutput && weights->desc().dim(Dim::C) > 1) { normalVal = 5; } - shift = correctShift(shift, firstStage, stage->origLayer()->type); shift -= normalVal; } firstStage = false; scale = 1; - if (shift > scaleThreshold) { + if (shift >= scaleThreshold) { scale = static_cast(1ULL << static_cast(shift)); }