From d2bd7c18f2387343bced4767dfeccb51435ff8d9 Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Tue, 10 May 2022 14:40:52 +0800 Subject: [PATCH] [Eager]Fix VarWrapper isintance type problem (#1085) * [Eager]Support dygraph2program for Eager Mode without program_desc_tracing * [Eager]Fix VarWrapper isintance type problem Co-authored-by: whs --- paddleslim/core/graph_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddleslim/core/graph_wrapper.py b/paddleslim/core/graph_wrapper.py index fc0928ef..14fc9256 100644 --- a/paddleslim/core/graph_wrapper.py +++ b/paddleslim/core/graph_wrapper.py @@ -37,7 +37,7 @@ OPTIMIZER_OPS = [ class VarWrapper(object): def __init__(self, var, graph): - assert isinstance(var, Variable) + assert isinstance(var, (Variable, Parameter)) assert isinstance(graph, GraphWrapper) self._var = var self._graph = graph -- GitLab