Skip to content
Snippets Groups Projects
Unverified Commit d6906442 authored by i-robot's avatar i-robot Committed by Gitee
Browse files

!3896 fix scop

Merge pull request !3896 from 185******25/master
parents e868e006 de9e9a4c
No related branches found
No related tags found
No related merge requests found
......@@ -224,7 +224,7 @@ def train_net():
net = resnet(class_num=config.class_num)
# apply golden-stick algo
algo_kf = PrunerKfCompressAlgo({})
algo_kf = PrunerKfCompressAlgo(config)
load_fp32_ckpt(net)
net = algo_kf.apply(net)
lr = get_lr(lr_init=config.lr_init,
......@@ -261,7 +261,7 @@ def train_ft(net):
batch_size=config.batch_size, train_image_size=config.train_image_size,
eval_image_size=config.eval_image_size, target=config.device_target,
distribute=config.run_distribute)
algo_ft = PrunerFtCompressAlgo(prune_rate=config.prune_rate)
algo_ft = PrunerFtCompressAlgo(config)
net = algo_ft.apply(net)
load_pretrained_ckpt(net)
lr_ft_new = ms.Tensor(get_lr(lr_init=config.lr_init,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment