未验证 提交 a6e2114e 编写于 作者: L littletomatodonkey 提交者: GitHub

add find_unused_parameters param (#668)

* add find_unused_parameters param

* fix default val
上级 794caef2
...@@ -70,7 +70,9 @@ def main(args): ...@@ -70,7 +70,9 @@ def main(args):
config, parameter_list=net.parameters()) config, parameter_list=net.parameters())
if config["use_data_parallel"]: if config["use_data_parallel"]:
net = paddle.DataParallel(net) find_unused_parameters = config.get("find_unused_parameters", False)
net = paddle.DataParallel(
net, find_unused_parameters=find_unused_parameters)
# load model from checkpoint or pretrained model # load model from checkpoint or pretrained model
init_model(config, net, optimizer) init_model(config, net, optimizer)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册