modify for I489QV on facerecognition

This commit is contained in:
郑彬 2021-09-01 14:19:47 +08:00
parent 1518006924
commit 2c6d842ff2
1 changed files with 2 additions and 2 deletions

View File

@ -278,9 +278,9 @@ def run_train():
weight_decay=config.weight_decay)
scale_manager = DynamicLossScaleManager(init_loss_scale=config.dynamic_init_loss_scale, scale_factor=2,
scale_window=2000)
if config.device_target == "Ascend":
if config.device_target in ("Ascend", "GPU"):
model = Model(train_net, optimizer=opt, metrics=None, loss_scale_manager=scale_manager)
elif config.device_target in ("CPU", "GPU"):
elif config.device_target == "CPU":
model = Model(train_net, optimizer=opt, metrics=None, loss_scale_manager=None)
save_checkpoint_steps = config.ckpt_steps