提交 e872470c 编写于 作者: Y yeyunpeng

fix crop and DeconvDepthwiseConv2D bugs

上级 f21ee64f
...@@ -226,6 +226,8 @@ lite::Primitive *ModelImpl::CopyPrimitive(const schema::Primitive *srcPrim) { ...@@ -226,6 +226,8 @@ lite::Primitive *ModelImpl::CopyPrimitive(const schema::Primitive *srcPrim) {
return new lite::EmbeddingLookup(const_cast<schema::Primitive *>(srcPrim)); return new lite::EmbeddingLookup(const_cast<schema::Primitive *>(srcPrim));
case schema::PrimitiveType_Elu: case schema::PrimitiveType_Elu:
return new lite::Elu(const_cast<schema::Primitive *>(srcPrim)); return new lite::Elu(const_cast<schema::Primitive *>(srcPrim));
case schema::PrimitiveType_DeDepthwiseConv2D:
return new lite::DeconvDepthwiseConv2D(const_cast<schema::Primitive *>(srcPrim));
default: default:
break; break;
} }
......
...@@ -32,7 +32,8 @@ int Crop::InferShape(std::vector<tensor::Tensor *> inputs, std::vector<tensor::T ...@@ -32,7 +32,8 @@ int Crop::InferShape(std::vector<tensor::Tensor *> inputs, std::vector<tensor::T
return RET_PARAM_INVALID; return RET_PARAM_INVALID;
} }
outputs[0]->set_shape(inputs[1]->shape()); 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; return RET_OK;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册