PaddleSlim
PaddleSlim copied to clipboard
提个建议
我相信你们的技术很强,但是你们的文档实在是太差了,对于初学者根本无法下手。 举个例子,你们的自动压缩ACT,在readme 里面只有量化的选项,我照搬这个例子去运行,可以正常运行,但是如果我需要剪枝呢,该怎么设置,没有例子,没有文档说明,我去看源代码,看到了相关设置,结果还是报错,按照报错提示修改了还是没用。后来发现你们有个文档网站https://paddleslim.readthedocs.io/zh_CN/develop/cv/detection/static/paddledetection_slim_pruing_tutorial.html, 结果根本就没有详细说明和例子,跳来跳去又跳到github上。微软的nni做的很好,跟着例子就能照猫画虎,你们的这个,我摸索了半天了,还是不行
我现在想跑通 “example/auto_compression/image_classification” 这里的例子都失败,明明在前一个目录又数据集下载的地址,在这里又指到ImageNet,ImageNet又没有提供清楚的下载地址,而且国内不好登录这个网站。
下载MobileNet预测模型 wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileNetV1_infer.tar tar -xf MobileNetV1_infer.tar 下载ImageNet小型数据集 wget https://sys-p0.bj.bcebos.com/slim_ci/ILSVRC2012_data_demo.tar.gz tar -xf ILSVRC2012_data_demo.tar.gz
但依然还是失败,为什么跑一个现成的例子都这么费劲啊
File "/home/inspur/miniconda3/envs/py37_v1/lib/python3.7/site-packages/paddleslim/auto_compression/compressor.py", line 689, in single_strategy_compress │ train_config.origin_metric, metric)) │ RuntimeError: target metric of pretrained model is 0.70898, but now is 0.0, Please check the format of evaluation dataset │ or check the origin_metric in train_config
放弃了,你们说明示例没有几个能一次性跑通的吗,'demo/prune/train.py' ,真实要晕死,太累了用你们这个
[Hint: 'cudaErrorNoKernelImageForDevice'. This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifiescode generation options for a particular CUDA source file that do not include the corresponding device configuration.] (at /paddle/paddle/fluid/framework/details/all_reduce_op_handle.cc:299)
请问下这是用的哪个示例
我现在想跑通 “example/auto_compression/image_classification” 这里的例子都失败,明明在前一个目录又数据集下载的地址,在这里又指到ImageNet,ImageNet又没有提供清楚的下载地址,而且国内不好登录这个网站。
下载MobileNet预测模型 wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileNetV1_infer.tar tar -xf MobileNetV1_infer.tar 下载ImageNet小型数据集 wget https://sys-p0.bj.bcebos.com/slim_ci/ILSVRC2012_data_demo.tar.gz tar -xf ILSVRC2012_data_demo.tar.gz
但依然还是失败,为什么跑一个现成的例子都这么费劲啊
File "/home/inspur/miniconda3/envs/py37_v1/lib/python3.7/site-packages/paddleslim/auto_compression/compressor.py", line 689, in single_strategy_compress │ train_config.origin_metric, metric)) │ RuntimeError: target metric of pretrained model is 0.70898, but now is 0.0, Please check the format of evaluation dataset │ or check the origin_metric in train_config
我相信你们的技术很强,但是你们的文档实在是太差了,对于初学者根本无法下手。 举个例子,你们的自动压缩ACT,在readme 里面只有量化的选项,我照搬这个例子去运行,可以正常运行,但是如果我需要剪枝呢,该怎么设置,没有例子,没有文档说明,我去看源代码,看到了相关设置,结果还是报错,按照报错提示修改了还是没用。后来发现你们有个文档网站https://paddleslim.readthedocs.io/zh_CN/develop/cv/detection/static/paddledetection_slim_pruing_tutorial.html, 结果根本就没有详细说明和例子,跳来跳去又跳到github上。微软的nni做的很好,跟着例子就能照猫画虎,你们的这个,我摸索了半天了,还是不行
具体想换成剪枝的话 可以参考这个文档得到各个参数的含义: https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/hyperparameter_tutorial.md#113-%E7%BB%93%E6%9E%84%E5%8C%96%E7%A8%80%E7%96%8Fsparsity 具体使用示例参考: https://github.com/PaddlePaddle/PaddleSlim/blob/develop/example/auto_compression/image_classification/configs/EfficientNetB0/prune_dis.yaml
放弃了,你们说明示例没有几个能一次性跑通的吗,'demo/prune/train.py' ,真实要晕死,太累了用你们这个
[Hint: 'cudaErrorNoKernelImageForDevice'. This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifiescode generation options for a particular CUDA source file that do not include the corresponding device configuration.] (at /paddle/paddle/fluid/framework/details/all_reduce_op_handle.cc:299)
这个报错看起来是您的paddle安装的不是适合您环境的paddle版本,可以检查下自己的环境
请问下这是用的哪个示例
我现在想跑通 “example/auto_compression/image_classification” 这里的例子都失败,明明在前一个目录又数据集下载的地址,在这里又指到ImageNet,ImageNet又没有提供清楚的下载地址,而且国内不好登录这个网站。
下载MobileNet预测模型 wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileNetV1_infer.tar tar -xf MobileNetV1_infer.tar 下载ImageNet小型数据集 wget https://sys-p0.bj.bcebos.com/slim_ci/ILSVRC2012_data_demo.tar.gz tar -xf ILSVRC2012_data_demo.tar.gz
但依然还是失败,为什么跑一个现成的例子都这么费劲啊
File "/home/inspur/miniconda3/envs/py37_v1/lib/python3.7/site-packages/paddleslim/auto_compression/compressor.py", line 689, in single_strategy_compress │ train_config.origin_metric, metric)) │ RuntimeError: target metric of pretrained model is 0.70898, but now is 0.0, Please check the format of evaluation dataset │ or check the origin_metric in train_config
这个是自动压缩的例子:example/auto_compression/image_classification/configs/MobileNetV1/qat_dis.yaml,貌似是下载的权重不对,刚开始验证的时候,准确率0,报错退出了,后来我手动修改配置文件参数的origin_metric: 0.0,没有这个错误之后又报
OSError: (External) CUDA error(209), no kernel image is available for execution on the device. │ [Hint: 'cudaErrorNoKernelImageForDevice'. This indicates that there is no kernel image available that is suitable for the device. This can occur when a use│ r specifiescode generation options for a particular CUDA source file that do not include the corresponding device configuration.] (at /paddle/paddle/fluid/fr│ amework/details/all_reduce_op_handle.cc:299)
我确定现在paddle 和 paddleslim的版本是一致的,都是2.3.1
放弃了,你们说明示例没有几个能一次性跑通的吗,'demo/prune/train.py' ,真实要晕死,太累了用你们这个
[Hint: 'cudaErrorNoKernelImageForDevice'. This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifiescode generation options for a particular CUDA source file that do not include the corresponding device configuration.] (at /paddle/paddle/fluid/framework/details/all_reduce_op_handle.cc:299)
这个报错看起来是您的paddle安装的不是适合您环境的paddle版本,可以检查下自己的环境
版本是一致的还是报错
paddlepaddle-gpu 2.3.1 │ paddleslim 2.3.1
放弃了,你们说明示例没有几个能一次性跑通的吗,'demo/prune/train.py' ,真实要晕死,太累了用你们这个
[Hint: 'cudaErrorNoKernelImageForDevice'. This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifiescode generation options for a particular CUDA source file that do not include the corresponding device configuration.] (at /paddle/paddle/fluid/framework/details/all_reduce_op_handle.cc:299)
这个报错看起来是您的paddle安装的不是适合您环境的paddle版本,可以检查下自己的环境
版本是一致的还是报错
paddlepaddle-gpu 2.3.1 │ paddleslim 2.3.1
python
import paddle
paddle.utils.run_check()
可以运行以上代码看下paddle版本是否正确安装
我现在想跑通 “example/auto_compression/image_classification” 这里的例子都失败,明明在前一个目录又数据集下载的地址,在这里又指到ImageNet,ImageNet又没有提供清楚的下载地址,而且国内不好登录这个网站。
下载MobileNet预测模型 wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileNetV1_infer.tar tar -xf MobileNetV1_infer.tar 下载ImageNet小型数据集 wget https://sys-p0.bj.bcebos.com/slim_ci/ILSVRC2012_data_demo.tar.gz tar -xf ILSVRC2012_data_demo.tar.gz
但依然还是失败,为什么跑一个现成的例子都这么费劲啊
File "/home/inspur/miniconda3/envs/py37_v1/lib/python3.7/site-packages/paddleslim/auto_compression/compressor.py", line 689, in single_strategy_compress │ train_config.origin_metric, metric)) │ RuntimeError: target metric of pretrained model is 0.70898, but now is 0.0, Please check the format of evaluation dataset │ or check the origin_metric in train_config
朋友 我跑auto_compression/pytorch_yolo_series,也是第一次使用paddle,但是按照官方 环境一直不对,2022-09-02 11:00:05,809-INFO: Now translating model from onnx to paddle. 2022-09-02 11:00:05,809-WARNING: init() missing 1 required positional argument: 'enable_onnx_checker' 2022-09-02 11:00:05,809-ERROR: x2paddle threw an exception, you can ask for help 能麻烦说下你环境怎么搞的吗,谢谢 如果可以的话 提供个能跑rep的镜像也行
@ly0303521 @shituo123456 抱歉,文档没写好,给你不好的体验了。 可以加一下微信(18813190139),我们拉群专项支持您这边使用,同步我们优化产品文档。
@shituo123456 可以打印看下你的x2paddle是1.3.6以上版本吗?
pip list|grep x2paddle