PaddlePaddle / PaddleSlim

PaddleSlim is an open-source library for deep model compression and architecture search.
https://paddleslim.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.56k stars 345 forks source link

from paddleslim.dygraph.dist中没有import AdaptorBase #1871

Closed wangfeiyun closed 7 months ago

wangfeiyun commented 7 months ago

from paddleslim.dygraph.dist import AdaptorBase出现错误,显示没有AdaptorBase,打开文件位置,发现的确没有,但是安装paddleslim好像是没啥问题

zzjjay commented 7 months ago

请问是在哪看到调用这个api呢? 代码文件中显示没有该api

wangfeiyun commented 7 months ago

请问是在哪看到调用这个api呢? 代码文件中显示没有该api

我采用的是paddlpaddle2.6,并且对应的paddleslim也下载了2,6.调用蒸馏的接口deploy/slim/distill/distill_train.py

wangfeiyun commented 7 months ago

请问是在哪看到调用这个api呢? 代码文件中显示没有该api

我采用的是paddlpaddle2.6,并且对应的paddleslim也下载了2,6.调用蒸馏的接口deploy/slim/distill/distill_train.py

请问是在哪看到调用这个api呢? 代码文件中显示没有该api

在distill_train.py的同级distill_config.py中from paddleslim.dygraph.dist import AdaptorBase

zzjjay commented 7 months ago

deploy/slim/distill/distill_train.py

这是哪个页面的代码?似乎不是PaddleSlim 里的

wangfeiyun commented 7 months ago

请问是在哪看到调用这个api呢? 代码文件中显示没有该api

![Uploading 1.JPG…]()

wangfeiyun commented 7 months ago

deploy/slim/distill/distill_train.py

这是哪个页面的代码?似乎不是PaddleS我上传了图片 代码地址https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.9/deploy/slim/distill/distill_config.py

wangfeiyun commented 7 months ago

deploy/slim/distill/distill_train.py

这是哪个页面的代码?似乎不是PaddleS我上传了图片 代码地址 https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.9/deploy/slim/distill/distill_config.py

我是将paddleseg2.9下载到本地进行运行的

zzjjay commented 7 months ago

paddleslim版本不对吧

请按照文档示例将 PaddleSlim 切换到制定commit https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.9/docs/deployment/slim/distill/distill_cn.md#21-%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87 image

wangfeiyun commented 7 months ago

paddleslim版本不对吧

请按照文档示例将 PaddleSlim 切换到制定commit https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.9/docs/deployment/slim/distill/distill_cn.md#21-%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87 image

好的,那我paddlepaddle2.6应该安装那个版本的paddleslim

wangfeiyun commented 7 months ago

这个问题还是没有解决

wangfeiyun commented 7 months ago

我又重新配置了一个虚拟环境,结果出现同样的问题

zzjjay commented 7 months ago

按照文档说明切换指定commit后,在PaddleSlim的目录下 paddleslim/dygraph/dist/distill.py 中 是能找到AdaptorBase的。

请先将之前的PaddleSlim卸载干净,再重新安装指定commit下的PaddleSlim