From bc8dddf68215e84ae7bb08fa28bb8e8e1345ab9b Mon Sep 17 00:00:00 2001 From: zhangxiaoxiao Date: Mon, 21 Jun 2021 15:50:37 +0800 Subject: [PATCH] yolov3_resnet18 bugfix --- .../official/cv/yolov3_resnet18/ascend310_infer/src/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model_zoo/official/cv/yolov3_resnet18/ascend310_infer/src/main.cc b/model_zoo/official/cv/yolov3_resnet18/ascend310_infer/src/main.cc index 26ea4ab5a34..06f9c2f9033 100644 --- a/model_zoo/official/cv/yolov3_resnet18/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/yolov3_resnet18/ascend310_infer/src/main.cc @@ -74,7 +74,7 @@ int PadImage(const MSTensor &input, MSTensor *output) { widthSize = shape[0]*heightScale; heightSize = shape[1]*heightScale; } - std::shared_ptr resize(new Resize({widthSize, heightSize}, InterpolationMode::kArea)); + std::shared_ptr resize(new Resize({widthSize, heightSize}, InterpolationMode::kCubicPil)); Execute composeResize({resize}); Status ret = composeResize(input, &imgResize); if (ret != kSuccess) { @@ -110,6 +110,7 @@ int main(int argc, char **argv) { auto context = std::make_shared(); auto ascend310 = std::make_shared(); ascend310->SetDeviceID(FLAGS_device_id); + ascend310->SetBufferOptimizeMode("off_optimize"); context->MutableDeviceInfo().push_back(ascend310); mindspore::Graph graph; Serialization::Load(FLAGS_mindir_path, ModelType::kMindIR, &graph);