未验证 提交 b521fd55 编写于 作者: W whs 提交者: GitHub

Fix cod in API doc of pruning. (#836)

上级 060beb78
......@@ -28,7 +28,7 @@ L1NormFilterPruner
from paddleslim import L1NormFilterPruner
net = mobilenet_v1(pretrained=False)
pruner = L1NormFilterPruner(net, [1, 3, 224, 224])
pruner.prune_var("conv2d_26.w_0", [0], pruned_ratio=0.5)
pruner.prune_var("conv2d_26.w_0", [0], 0.5)
optimizer = paddle.optimizer.Momentum(
learning_rate=0.1,
parameters=net.parameters())
......@@ -79,7 +79,7 @@ L1NormFilterPruner
from paddleslim import L1NormFilterPruner
net = mobilenet_v1(pretrained=False)
pruner = L1NormFilterPruner(net, [1, 3, 224, 224])
plan = pruner.prune_var("conv2d_26.w_0", [0])
plan = pruner.prune_var("conv2d_26.w_0", [0], 0.5)
print(f"plan: {plan}")
paddle.summary(net, (1, 3, 224, 224))
..
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册