You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.
请提出你的问题 Please ask your question
Global:
model_dir: slim/output_model
model_filename: model.pdmodel
params_filename: model.pdiparams
Distillation:
alpha: 1.0
loss: l2
node:
- block4.2.mlp.fc2 # change to the name of the output of the last conv in the model.pdmodel in netron
QuantAware:
onnx_format: False
quantize_op_types:
- conv2d
- depthwise_conv2d
TrainConfig:
epochs: 1
eval_iter: 1000
learning_rate: 0.0005
optimizer_builder:
optimizer:
type: SGD
weight_decay: 4.0e-05
使用的配置文件如上,当不注释Distillation部分是,会提示错误:
I0829 09:00:02.586479 20276 program_interpreter.cc:212] New Executor is Running.
W0829 09:00:02.897599 20276 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 12.2, Runtime API Version:
11.2
W0829 09:00:02.904767 20276 gpu_resources.cc:164] device: 0, cuDNN Version: 8.2.
2024-08-29 09:00:04,526-INFO: devices: gpu
2024-08-29 09:00:25,280-INFO: Selected strategies: ['qat_dis']
2024-08-29 09:00:27,045-INFO: train config.distill_node_pair: ['block4.2.mlp.fc2']
Traceback (most recent call last):
File "deploy\slim\act\run_seg.py", line 205, in <module>
main(args)
File "deploy\slim\act\run_seg.py", line 199, in main
ac.compress()
File "C:\Users\DELL\.conda\envs\paddle\lib\site-packages\paddleslim\auto_compression\compressor.py", line 586, in compress
self.single_strategy_compress(strategy, config, strategy_idx,
File "C:\Users\DELL\.conda\envs\paddle\lib\site-packages\paddleslim\auto_compression\compressor.py", line 769, in single_strategy_compress
train_program_info, test_program_info = self._prepare_program(
File "C:\Users\DELL\.conda\envs\paddle\lib\site-packages\paddleslim\auto_compression\compressor.py", line 506, in _prepare_program
train_program_info, test_program_info = build_distill_program(
File "C:\Users\DELL\.conda\envs\paddle\lib\site-packages\paddleslim\auto_compression\create_compressed_program.py", line 380, in build_distill_program
distill_loss, loss_dict = _parse_distill_loss(
File "C:\Users\DELL\.conda\envs\paddle\lib\site-packages\paddleslim\auto_compression\create_compressed_program.py", line 163, in _parse_distill_loss assert len(node) % 2 == 0, \
AssertionError: distill_node_pair config wrong, the length needs to be an even number
2024-08-29 09:04:13,725-INFO: Selected strategies: []
Traceback (most recent call last):
File "deploy\slim\act\run_seg.py", line 205, in <module>
main(args)
File "deploy\slim\act\run_seg.py", line 199, in main
ac.compress()
File "C:\Users\DELL\.conda\envs\paddle\lib\site-packages\paddleslim\auto_compression\compressor.py", line 577, in compress
assert len(self._strategy) > 0
AssertionError
问题确认 Search before asking
请提出你的问题 Please ask your question
使用的配置文件如上,当不注释Distillation部分是,会提示错误:
参考https://github.com/PaddlePaddle/PaddleSlim/issues/1631,对Distillation部分进行注释,提示错误
这是说明模型没有自动寻找最后一个带参数节点作为蒸馏节点吗?
同时使用了netron可视化模型,某些层输出Tensor名称如下:
并没有输出名称
The text was updated successfully, but these errors were encountered: