From cdb98e2da0feeb0a9f30207ceec9d91be2bcd4ca Mon Sep 17 00:00:00 2001 From: whs Date: Sun, 19 Apr 2020 14:15:08 +0800 Subject: [PATCH] Fix equal function in VarWrapper. (#227) --- 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 d8658652..04a85d8f 100644 --- a/paddleslim/core/graph_wrapper.py +++ b/paddleslim/core/graph_wrapper.py @@ -46,7 +46,7 @@ class VarWrapper(object): """ Overwrite this function for ...in... syntax in python. """ - return self._var.name == v._var.name + return (v is not None) and self._var.name == v._var.name def name(self): """ -- GitLab