提交 fb0dd18a 编写于 作者: F FlyingQianMM

fix errors

上级 33aff574
...@@ -232,9 +232,8 @@ class FasterRCNN(BaseAPI): ...@@ -232,9 +232,8 @@ class FasterRCNN(BaseAPI):
self.net_initialize( self.net_initialize(
startup_prog=fluid.default_startup_program(), startup_prog=fluid.default_startup_program(),
pretrain_weights=pretrain_weights, pretrain_weights=pretrain_weights,
fuse_bn=fuse_bn,
save_dir=save_dir, save_dir=save_dir,
sensitivities_file=sensitivities_file,
eval_metric_loss=eval_metric_loss,
resume_checkpoint=resume_checkpoint) resume_checkpoint=resume_checkpoint)
start_epoch = 0 start_epoch = 0
if resume_checkpoint: if resume_checkpoint:
......
...@@ -199,9 +199,8 @@ class MaskRCNN(FasterRCNN): ...@@ -199,9 +199,8 @@ class MaskRCNN(FasterRCNN):
self.net_initialize( self.net_initialize(
startup_prog=fluid.default_startup_program(), startup_prog=fluid.default_startup_program(),
pretrain_weights=pretrain_weights, pretrain_weights=pretrain_weights,
fuse_bn=fuse_bn,
save_dir=save_dir, save_dir=save_dir,
sensitivities_file=sensitivities_file,
eval_metric_loss=eval_metric_loss,
resume_checkpoint=resume_checkpoint) resume_checkpoint=resume_checkpoint)
start_epoch = 0 start_epoch = 0
if resume_checkpoint: if resume_checkpoint:
......
...@@ -300,8 +300,8 @@ def load_pretrain_weights(exe, ...@@ -300,8 +300,8 @@ def load_pretrain_weights(exe,
if pretrained_shape != actual_shape: if pretrained_shape != actual_shape:
raise Exception( raise Exception(
"Shape of optimizer variable {} doesn't match.(Last: {}, Now: {}), {}" "Shape of optimizer variable {} doesn't match.(Last: {}, Now: {}), {}"
.format(var.name, opt_dict[var.name].shape, .format(var.name, pretrained_shape,
var.shape), exception_message) actual_shape), exception_message)
optimizer_varname_list = [var.name for var in optimizer_var_list] optimizer_varname_list = [var.name for var in optimizer_var_list]
if os.exists(osp.join(weights_dir, 'learning_rate') if os.exists(osp.join(weights_dir, 'learning_rate')
) and 'learning_rate' not in optimizer_varname_list: ) and 'learning_rate' not in optimizer_varname_list:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册