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
Copy file name to clipboardExpand all lines: paddleslim/auto_compression/compressor.py
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -96,9 +96,9 @@ def __init__(self,
96
96
If set to None, will choose a strategy automatically. Default: None.
97
97
target_speedup(float, optional): target speedup ratio by the way of auto compress. Default: None.
98
98
eval_callback(function, optional): eval function, define by yourself to return the metric of the inference program, can be used to judge the metric of compressed model. The documents of how to write eval function is `https://github.com/PaddlePaddle/PaddleSlim/blob/develop/docs/zh_cn/api_cn/static/auto-compression/custom_function.rst`_ . ``eval_callback`` and ``eval_dataloader`` cannot be None at the same time. Dafault: None.
99
-
eval_dataloader(paddle.io.Dataloader, optional): The
100
-
Generator or Dataloader provides eval data, and it could
101
-
return a batch every time. ``eval_callback`` and ``eval_dataloader`` cannot be None at the same time. Dafault: None.
99
+
eval_dataloader(paddle.io.Dataloader, optional): The Generator or Dataloader provides eval data, and it could
100
+
return a batch every time. If eval_dataloader is None, will take first 5000 sample from train_dataloader
101
+
as eval_dataloader, and the metric of eval_dataloader for reference only. Dafault: None.
102
102
deploy_hardware(str, optional): The hardware you want to deploy. Default: 'gpu'.
0 commit comments