yolov3_resnet18 bugfix

This commit is contained in:
zhangxiaoxiao 2021-06-21 15:50:37 +08:00
parent a8553078b9
commit bc8dddf682
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,7 @@ int PadImage(const MSTensor &input, MSTensor *output) {
widthSize = shape[0]*heightScale;
heightSize = shape[1]*heightScale;
}
std::shared_ptr<TensorTransform> resize(new Resize({widthSize, heightSize}, InterpolationMode::kArea));
std::shared_ptr<TensorTransform> 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<Context>();
auto ascend310 = std::make_shared<mindspore::Ascend310DeviceInfo>();
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);