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

Fix demo of pruning. (#79)

上级 5a8f87af
...@@ -208,7 +208,7 @@ def compress(args): ...@@ -208,7 +208,7 @@ def compress(args):
val_program, val_program,
fluid.global_scope(), fluid.global_scope(),
params=params, params=params,
ratios=[FLAGS.pruned_ratio] * len(params), ratios=[args.pruned_ratio] * len(params),
place=place, place=place,
only_graph=True) only_graph=True)
...@@ -216,7 +216,7 @@ def compress(args): ...@@ -216,7 +216,7 @@ def compress(args):
fluid.default_main_program(), fluid.default_main_program(),
fluid.global_scope(), fluid.global_scope(),
params=params, params=params,
ratios=[FLAGS.pruned_ratio] * len(params), ratios=[args.pruned_ratio] * len(params),
place=place) place=place)
_logger.info("FLOPs after pruning: {}".format(flops(pruned_program))) _logger.info("FLOPs after pruning: {}".format(flops(pruned_program)))
for i in range(args.num_epochs): for i in range(args.num_epochs):
......
#paddlepaddle == 1.6.0rc0 #paddlepaddle == 1.6.0rc0
tqdm
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册