diff --git a/paddleslim/core/graph_wrapper.py b/paddleslim/core/graph_wrapper.py index d865865284cc5598a8940558bd28a8a95e1539fc..04a85d8f15f6fda3c5f871c5845152cab46322bc 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): """