forked from mindspore-Ecosystem/mindspore
yolov3_resnet18 bugfix
This commit is contained in:
parent
a8553078b9
commit
bc8dddf682
|
@ -74,7 +74,7 @@ int PadImage(const MSTensor &input, MSTensor *output) {
|
||||||
widthSize = shape[0]*heightScale;
|
widthSize = shape[0]*heightScale;
|
||||||
heightSize = shape[1]*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});
|
Execute composeResize({resize});
|
||||||
Status ret = composeResize(input, &imgResize);
|
Status ret = composeResize(input, &imgResize);
|
||||||
if (ret != kSuccess) {
|
if (ret != kSuccess) {
|
||||||
|
@ -110,6 +110,7 @@ int main(int argc, char **argv) {
|
||||||
auto context = std::make_shared<Context>();
|
auto context = std::make_shared<Context>();
|
||||||
auto ascend310 = std::make_shared<mindspore::Ascend310DeviceInfo>();
|
auto ascend310 = std::make_shared<mindspore::Ascend310DeviceInfo>();
|
||||||
ascend310->SetDeviceID(FLAGS_device_id);
|
ascend310->SetDeviceID(FLAGS_device_id);
|
||||||
|
ascend310->SetBufferOptimizeMode("off_optimize");
|
||||||
context->MutableDeviceInfo().push_back(ascend310);
|
context->MutableDeviceInfo().push_back(ascend310);
|
||||||
mindspore::Graph graph;
|
mindspore::Graph graph;
|
||||||
Serialization::Load(FLAGS_mindir_path, ModelType::kMindIR, &graph);
|
Serialization::Load(FLAGS_mindir_path, ModelType::kMindIR, &graph);
|
||||||
|
|
Loading…
Reference in New Issue