diff --git a/python/paddle/nn/utils/transform_parameters.py b/python/paddle/nn/utils/transform_parameters.py index c3f9562e544e8..80f1aaf90382e 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