X2Paddle icon indicating copy to clipboard operation
X2Paddle copied to clipboard

onnx 转换失败

Open thomaszheng opened this issue 4 years ago • 4 comments

模型来源: onnx 模型说明: 文本检测dbnet网络 模型文件:链接: https://pan.baidu.com/s/1ml6PFUdNey2TnHjSOcCqmg 密码: pieo

x2paddle --framework=onnx --model=ocr_detector.onnx --save_dir=pd_model

转换过程出错提示如下: python 3.6.2 x2paddle 1.3.1

paddle.__version__ = 2.0.0
Now translating model from onnx to paddle.
model ir_version: 6, op version: 9
shape inferencing ...
Stopping at incomplete shape inference at Concat: x2paddle_312
node inputs:
name: "x2paddle_296"
type {
  tensor_type {
    elem_type: 1
    shape {
      dim {
        dim_value: 1
      }
      dim {
        dim_value: 96
      }
      dim {
        dim_value: 64
      }
      dim {
        dim_value: 64
      }
    }
  }
}

name: "x2paddle_299"
type {
  tensor_type {
    elem_type: 1
    shape {
      dim {
        dim_value: 1
      }
      dim {
        dim_value: 96
      }
      dim {
        dim_value: 64
      }
      dim {
        dim_value: 64
      }
    }
  }
}

name: "x2paddle_302"
type {
  tensor_type {
    elem_type: 1
    shape {
      dim {
        dim_value: 1
      }
      dim {
        dim_value: 96
      }
      dim {
        dim_value: 64
      }
      dim {
        dim_value: 64
      }
    }
  }
}

name: "x2paddle_305"
type {
  tensor_type {
    elem_type: 1
    shape {
      dim {
        dim_value: 1
      }
      dim {
        dim_value: 96
      }
      dim {
        dim_value: 64
      }
      dim {
        dim_value: 64
      }
    }
  }
}

name: "x2paddle_311"
type {
  tensor_type {
    elem_type: 1
    shape {
      dim {
        dim_param: "Upsample93_o0__d0"
      }
      dim {
        dim_param: "Upsample93_o0__d1"
      }
      dim {
        dim_param: "Upsample93_o0__d2"
      }
      dim {
        dim_param: "Upsample93_o0__d3"
      }
    }
  }
}

node outputs:
name: "x2paddle_312"
type {
  tensor_type {
    elem_type: 1
    shape {
      dim {
      }
      dim {
        dim_param: "Upsample93_o0__d1 + 384"
      }
      dim {
      }
      dim {
      }
    }
  }
}

!!!!!!!!!!
shape inferenced.
Now, onnx2paddle support convert onnx model opset_verison [9],opset_verison of your onnx model is 9, automatically treated as op_set: 9.
Total nodes: 119
Nodes converting ...
Converting node 299 ...
Nodes converted

thomaszheng avatar Aug 30 '21 10:08 thomaszheng

模型能够转换成功,你可以先尝试看转换的模型能否正确部署。

yeliang2258 avatar Aug 31 '21 13:08 yeliang2258

是说这个报错信息是不影响的,模型是成功转换的

thomaszheng avatar Sep 01 '21 02:09 thomaszheng

说这个报错信息是不影响的,模型是成功转换的

转换成功的模型试试可以用吗?

yeliang2258 avatar Sep 01 '21 06:09 yeliang2258

确实可以推理,这个错误目前看不影响转换后的模型使用

thomaszheng avatar Sep 01 '21 07:09 thomaszheng