!348 fix export lite model

Merge pull request !348 from huanghui/fix-export-mslitmodel
This commit is contained in:
mindspore-ci-bot 2020-04-15 19:38:02 +08:00 committed by Gitee
commit 936bae7b93
1 changed files with 6 additions and 6 deletions

View File

@ -28,8 +28,8 @@ bool Conv2dPacker(const CNodePtr &c_node_ptr, OpDefT *ms_op) {
std::vector<int> kernel_size_value = AnfAlgo::GetNodeAttr<std::vector<int>>(c_node_ptr, "kernel_size");
std::string kernel_pad_mode_value = AnfAlgo::GetNodeAttr<std::string>(c_node_ptr, "pad_mode");
int kernel_pad_value = AnfAlgo::GetNodeAttr<int>(c_node_ptr, "pad");
int kernel_stride_value = AnfAlgo::GetNodeAttr<int>(c_node_ptr, "stride");
int kernel_dilation_value = AnfAlgo::GetNodeAttr<int>(c_node_ptr, "dilation");
auto kernel_stride_value = AnfAlgo::GetNodeAttr<std::vector<int>>(c_node_ptr, "stride");
auto kernel_dilation_value = AnfAlgo::GetNodeAttr<std::vector<int>>(c_node_ptr, "dilation");
std::string kernel_data_format_value = AnfAlgo::GetNodeAttr<std::string>(c_node_ptr, "data_format");
std::unique_ptr<Conv2DT> attr(new Conv2DT());
MS_EXCEPTION_IF_NULL(attr);
@ -43,15 +43,15 @@ bool Conv2dPacker(const CNodePtr &c_node_ptr, OpDefT *ms_op) {
attr->channelOut = kernel_channel_value;
attr->kernelW = kernel_size_value[0];
attr->kernelH = kernel_size_value[1];
attr->strideW = kernel_stride_value;
attr->strideH = kernel_stride_value;
attr->strideW = kernel_stride_value[0];
attr->strideH = kernel_stride_value[1];
attr->padMode = GetAttrPadMode(kernel_pad_mode_value);
attr->padUp = kernel_pad_value;
attr->padDown = kernel_pad_value;
attr->padLeft = kernel_pad_value;
attr->padRight = kernel_pad_value;
attr->dilateW = kernel_dilation_value;
attr->dilateH = kernel_dilation_value;
attr->dilateW = kernel_dilation_value[0];
attr->dilateH = kernel_dilation_value[1];
attr->hasBias = false;
ms_op->name = c_node_ptr->fullname_with_scope();
ms_op->attr.type = OpT_Conv2D;