未验证 提交 da75dd86 编写于 作者: Q qingqing01 提交者: GitHub

Refine fuse bn and change True to true in retinanet_r101_fpn_1x.yml (#2598)

上级 8e8a1b04
......@@ -3,7 +3,7 @@ train_feed: FasterRCNNTrainFeed
eval_feed: FasterRCNNEvalFeed
test_feed: FasterRCNNTestFeed
max_iters: 90000
use_gpu: True
use_gpu: true
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet101_pretrained.tar
weights: output/retinanet_r101_fpn_1x/model_final
log_smooth_window: 20
......
......@@ -168,9 +168,12 @@ def load_and_fusebn(exe, prog, path):
if not bn_in_path:
raise ValueError("The model in path {} has not params of batch norm.")
all_vars += [v for v in mean_variances]
# load running mean and running variance on cpu place into global scope.
place = fluid.CPUPlace()
exe_cpu = fluid.Executor(place)
fluid.io.load_vars(exe_cpu, path, vars=[v for v in mean_variances])
# load params including running mean and running variance into global scope.
# load params on real place into global scope.
fluid.io.load_vars(exe, path, prog, vars=all_vars)
eps = 1e-5
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册