From 5f00305de76537019798ddbad3bc976e7da3c93c Mon Sep 17 00:00:00 2001 From: WangZhen <23097963+0x45f@users.noreply.github.com> Date: Mon, 10 Jul 2023 10:59:13 +0800 Subject: [PATCH] Fix load fine tune error (#55233) --- python/paddle/jit/translated_layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/jit/translated_layer.py b/python/paddle/jit/translated_layer.py index daea9238733..a5f31c9bea3 100644 --- a/python/paddle/jit/translated_layer.py +++ b/python/paddle/jit/translated_layer.py @@ -338,6 +338,7 @@ class _ProgramHolder: self._output_descs = [] self._double_grad_descs = [] self._persistable_names = [] + self._grad_var_names = {} # execution scope self._inner_scope = core.Scope() @@ -350,7 +351,6 @@ class _ProgramHolder: self._train_program_desc = self._append_backward_desc( self._infer_program_desc ) - self._grad_var_names = {} # forward: @switch_to_static_graph -- GitLab