From e872470c70bd45c7ce099eafe1c6868fe8c950fa Mon Sep 17 00:00:00 2001 From: yeyunpeng Date: Tue, 11 Aug 2020 10:16:10 +0800 Subject: [PATCH] fix crop and DeconvDepthwiseConv2D bugs --- mindspore/lite/src/model_impl.cc | 2 ++ mindspore/lite/src/ops/crop.cc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mindspore/lite/src/model_impl.cc b/mindspore/lite/src/model_impl.cc index e4d2f1537af..ae45e829c17 100644 --- a/mindspore/lite/src/model_impl.cc +++ b/mindspore/lite/src/model_impl.cc @@ -226,6 +226,8 @@ lite::Primitive *ModelImpl::CopyPrimitive(const schema::Primitive *srcPrim) { return new lite::EmbeddingLookup(const_cast(srcPrim)); case schema::PrimitiveType_Elu: return new lite::Elu(const_cast(srcPrim)); + case schema::PrimitiveType_DeDepthwiseConv2D: + return new lite::DeconvDepthwiseConv2D(const_cast(srcPrim)); default: break; } diff --git a/mindspore/lite/src/ops/crop.cc b/mindspore/lite/src/ops/crop.cc index dceab29f9bf..c1b2bcfb491 100644 --- a/mindspore/lite/src/ops/crop.cc +++ b/mindspore/lite/src/ops/crop.cc @@ -32,7 +32,8 @@ int Crop::InferShape(std::vector inputs, std::vectorset_shape(inputs[1]->shape()); - outputs[0]->SetFormat(inputs[1]->GetFormat()); + outputs[0]->SetFormat(inputs[0]->GetFormat()); + outputs[0]->set_data_type(inputs[0]->data_type()); return RET_OK; }