Open xiaohui0225 opened 1 year ago
@xiaohui0225 目前问题已经复现哈,这边会排期看下具体问题
@xiaohui0225 您好,目前问题已经修复,更新下X2Paddle版本
# 确保老版本已经卸载
pip uninstall x2paddle
pip install x2paddle==1.4.0
卸载旧版本,安装1.4.0之后依然出错。
请问最后解决了吗?
请问最后解决了吗?
最后我将训练的pth转成了paddle的model。然后成功了。
请问没有通过onnx作为中间结果吗?您是直接将pytorch模型作为输入,使用pytorch2paddle吗?
---Original--- From: @.> Date: Mon, Jul 10, 2023 16:13 PM To: @.>; Cc: @.**@.>; Subject: Re: [PaddlePaddle/FastDeploy] convert failed node:onnx__Reshape_586,op_type is Conv (Issue #1119)
请问最后解决了吗?
最后我将训练的pth转成了paddle的model。然后成功了。
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
@xiaohui0225 what solution worked for you?
请问没有通过onnx作为中间结果吗?您是直接将pytorch模型作为输入,使用pytorch2paddle吗? … ---Original--- From: @.> Date: Mon, Jul 10, 2023 16:13 PM To: @.>; Cc: @.**@.>; Subject: Re: [PaddlePaddle/FastDeploy] convert failed node:onnx__Reshape_586,op_type is Conv (Issue #1119) 请问最后解决了吗? 最后我将训练的pth转成了paddle的model。然后成功了。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
现将pytorch得到的pth文件转成paddle的格式,然后再用deploy来量化就好啦
@xiaohui0225 what solution worked for you?
现将pytorch得到的pth文件转成paddle的格式,然后再用deploy来量化就好啦
我一般是将pytorch转成onnx,然后使用x2paddle转成paddle模型。有时候报错,有时候不报错
---Original--- From: @.> Date: Wed, Jan 31, 2024 16:05 PM To: @.>; Cc: @.**@.>; Subject: Re: [PaddlePaddle/FastDeploy] convert failed node:onnx__Reshape_586,op_type is Conv (Issue #1119)
请问没有通过onnx作为中间结果吗?您是直接将pytorch模型作为输入,使用pytorch2paddle吗? … ---Original--- From: @.> Date: Mon, Jul 10, 2023 16:13 PM To: @.>; Cc: @.@.>; Subject: Re: [PaddlePaddle/FastDeploy] convert failed node:onnx__Reshape_586,op_type is Conv (Issue #1119) 请问最后解决了吗? 最后我将训练的pth转成了paddle的model。然后成功了。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
现将pytorch得到的pth文件转成paddle的格式,然后再用deploy来量化就好啦
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
使用fastdeploy压缩yolov8的模型时出现如下问题,应该是在将onnx转paddle时出错了,问题如下: 指令: fastdeploy --auto_compress --config_path=。。。/FastDeploy-develop/tools/auto_compression/configs/detection/yolov8_quant_myself.yaml --method='QAT' --save_dir='。。。/FastDeploy-develop/tools/auto_compression/yolov8_ptq_model_test/' WARNING:root:No module named 'parl' /usr/local/anaconda3/envs/paddle_yolov8/lib/python3.8/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") /usr/local/anaconda3/envs/paddle_yolov8/lib/python3.8/site-packages/paddle/fluid/framework.py:477: UserWarning: PaddlePaddle version 2.3.0 or higher is required, but 0.0.0 installed, Maybe you are using a develop version, please make sure the version is good with your code. /usr/local/anaconda3/envs/paddle_yolov8/lib/python3.8/site-packages/paddleslim-0.0.0.dev0-py3.8.egg/paddleslim/quant/reconstruction_quantization.py:179: SyntaxWarning: "is" with a literal. Did you mean "=="? /usr/local/anaconda3/envs/paddle_yolov8/lib/python3.8/site-packages/paddleslim-0.0.0.dev0-py3.8.egg/paddleslim/quant/reconstruction_quantization.py:179: SyntaxWarning: "is" with a literal. Did you mean "=="? Welcome to use FastDeploy Auto Compression Toolkit! ----------- Running Arguments ----------- Distillation: alpha: 1.0 loss: soft_label Global: arch: YOLOv7 format: onnx input_list: ['x2paddle_images'] model_dir: 。。/Desktop/workspace/yolov8/weights/yolov8s.onnx model_filename: model.pdmodel params_filename: model.pdiparams ptq_image_path: 。。/Desktop/workspace/Dateset/NewDataset-aver2/images/val_small_aug ptq_preprocess: yolo_image_preprocess qat_batch_size: 8 qat_image_path: 。。/Desktop/workspace/Dateset/NewDataset-aver2/images/val_small_aug qat_preprocess: yolo_image_preprocess PTQ: calibration_method: avg skip_tensor_list: None Quantization: activation_quantize_type: moving_average_abs_max onnx_format: True quantize_op_types: ['conv2d', 'depthwise_conv2d'] TrainConfig: epochs: 20 learning_rate: T_max: 8000 learning_rate: 3e-05 type: CosineAnnealingDecay optimizer_builder: optimizer: type: SGD weight_decay: 4e-05 train_iter: 80000
2023-01-11 17:18:48,795-INFO: Now translating model from onnx to paddle. model ir_version: 7, op version: 13 Unknown shape for input tensor[tensor name: 'x2paddle_images'] -> shape: ['batch', 3, 640, 640], Please define shape of input here, Note:you can use visualization tools like Netron to check input shape. Shape of Input(e.g. -1,3,224,224), enter 'N' to skip: -1,3,640,640 shape inferencing ... [WARNING] Incomplete symbolic shape inference shape inferenced. Now, onnx2paddle support convert onnx model opset_verison [7, 8, 9, 10, 11, 12, 13, 14, 15], opset_verison of your onnx model is 13. Total nodes: 259 Nodes converting ... Converting node 386 ... 2023-01-11 17:18:57,088-WARNING: convert failed node:onnx__Reshape_586, op_type is Conv 2023-01-11 17:18:57,088-ERROR: x2paddle threw an exception, you can ask for help at: https://github.com/PaddlePaddle/X2Paddle/issues
请问,出现如上问题是因为fastdeploy还不支持yolov8吗? 我所使用的yolov8s.onnx : 链接:https://pan.baidu.com/s/1U77yKCFvq9L2dl22Glvmdg 提取码:uew0