Skip to content
Snippets Groups Projects
Commit ba3c19ed authored by 7347157+joylvliang@user.noreply.gitee.com's avatar 7347157+joylvliang@user.noreply.gitee.com
Browse files

enable_dtype_correct_for_pynative_deeptext_network

parent 560ee514
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,8 @@ def run_train():
net.to_float(mstype.float16)
loss = LossNet()
if device_type == "Ascend":
loss.to_float(mstype.float32)
lr = Tensor(dynamic_lr(config, rank_size=device_num), mstype.float32)
opt = Momentum(params=net.trainable_params(), learning_rate=lr, momentum=config.momentum,
......
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