From a6e2114e322914229da1ef952049656dcbdd2bea Mon Sep 17 00:00:00 2001 From: littletomatodonkey <2120160898@bit.edu.cn> Date: Tue, 6 Apr 2021 21:29:38 +0800 Subject: [PATCH] add find_unused_parameters param (#668) * add find_unused_parameters param * fix default val --- tools/train.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/train.py b/tools/train.py index 0da14bf0..4c10136c 100644 --- a/tools/train.py +++ b/tools/train.py @@ -70,7 +70,9 @@ def main(args): config, parameter_list=net.parameters()) 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 init_model(config, net, optimizer) -- GitLab