Skip to content

Commit 1c262ba

Browse files
Add API for get ratios from sensitives. (PaddlePaddle#3)
1 parent ad91007 commit 1c262ba

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/docs/api/prune_api.md

+20
Original file line numberDiff line numberDiff line change
@@ -332,3 +332,23 @@ print(sensitivities)
332332
- **sensitivities(dict)**敏感度信息。
333333

334334
示例:
335+
336+
## get_ratios_by_loss(sensitivities, loss)
337+
338+
根据敏感度和精度损失阈值计算出一组剪切率。对于参数`w`, 其剪裁率为使精度损失低于`loss`的最大剪裁率。
339+
340+
参数:
341+
342+
- **sensitivities(dict):** 敏感度信息。
343+
344+
- **loss:** 精度损失阈值。
345+
346+
返回:
347+
348+
- ratios(dict): 一组剪切率。`key`是待剪裁参数的名称。`value`是对应参数的剪裁率。
349+
350+
示例:
351+
352+
```
353+
354+
```

0 commit comments

Comments
 (0)