!4260 fix crop and DeDepthwiseConv2D bugs

Merge pull request !4260 from yeyunpeng2020/master
This commit is contained in:
mindspore-ci-bot 2020-08-11 10:32:23 +08:00 committed by Gitee
commit f287471fc1
2 changed files with 4 additions and 1 deletions

View File

@ -226,6 +226,8 @@ lite::Primitive *ModelImpl::CopyPrimitive(const schema::Primitive *srcPrim) {
return new lite::EmbeddingLookup(const_cast<schema::Primitive *>(srcPrim));
case schema::PrimitiveType_Elu:
return new lite::Elu(const_cast<schema::Primitive *>(srcPrim));
case schema::PrimitiveType_DeDepthwiseConv2D:
return new lite::DeconvDepthwiseConv2D(const_cast<schema::Primitive *>(srcPrim));
default:
break;
}

View File

@ -32,7 +32,8 @@ int Crop::InferShape(std::vector<tensor::Tensor *> inputs, std::vector<tensor::T
return RET_PARAM_INVALID;
}
outputs[0]->set_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;
}