diff --git a/python/mxnet/kvstore.py b/python/mxnet/kvstore.py index a6d3aa51..23eb454b 100644 --- a/python/mxnet/kvstore.py +++ b/python/mxnet/kvstore.py @@ -408,7 +408,7 @@ def set_gradient_compression(self, compression_params): Other keys in this dictionary are optional and specific to the type of gradient compression. """ - if (self.type == 'device') or ('dist' in self.type): + if ('device' in self.type) or ('dist' in self.type): ckeys, cvals = _ctype_dict(compression_params) check_call(_LIB.MXKVStoreSetGradientCompression(self.handle, mx_uint(len(compression_params)),