From b79fee116a2ecd9c536aec98fd56ac873730b76b Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Wed, 12 May 2021 09:52:59 +0800 Subject: [PATCH] delete print --- deploy/slim/prune/sensitivity_anal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/slim/prune/sensitivity_anal.py b/deploy/slim/prune/sensitivity_anal.py index 587d814c..ecf990b1 100644 --- a/deploy/slim/prune/sensitivity_anal.py +++ b/deploy/slim/prune/sensitivity_anal.py @@ -97,7 +97,7 @@ def main(config, device, logger, vdl_writer): model = build_model(config['Architecture']) flops = paddle.flops(model, [1, 3, 640, 640]) - print(f"FLOPs before pruning: {flops}") + logger.info(f"FLOPs before pruning: {flops}") from paddleslim.dygraph import FPGMFilterPruner model.train() @@ -144,10 +144,10 @@ def main(config, device, logger, vdl_writer): for param in model.parameters(): if ("weights" in param.name and "conv" in param.name) or ( "w_0" in param.name and "conv2d" in param.name): - print(f"{param.name}: {param.shape}") + logger.info(f"{param.name}: {param.shape}") flops = paddle.flops(model, [1, 3, 640, 640]) - print(f"FLOPs after pruning: {flops}") + logger.info(f"FLOPs after pruning: {flops}") # start train program.train(config, train_dataloader, valid_dataloader, device, model, -- GitLab