From d87a455cf49f06ceb036090cd0dce68329ac4e14 Mon Sep 17 00:00:00 2001 From: cyberslack_lee Date: Tue, 17 Oct 2023 12:07:53 +0800 Subject: [PATCH] No.12 Modify paddle.nn.utils.parameters_to_vector's stop_gradient to False (#56761) * fix * fix * fix * CI * fix * fix * fix * fix * fix * fix * fix * fix * fix --- python/paddle/nn/utils/transform_parameters.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/nn/utils/transform_parameters.py b/python/paddle/nn/utils/transform_parameters.py index 7cb628565cff95..8db65d61bb5bac 100644 --- a/python/paddle/nn/utils/transform_parameters.py +++ b/python/paddle/nn/utils/transform_parameters.py @@ -121,6 +121,7 @@ def parameters_to_vector(parameters, name=None): ) for i, param in enumerate(parameters): _inplace_reshape_dygraph(param, origin_shapes[i]) + out.stop_gradient = False return out