diff --git a/mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py b/mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py index 7244ee0..3f87e25 100644 --- a/mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py +++ b/mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py @@ -121,7 +121,7 @@ class SuppressCtrl(Cell): self.sparse_vibra = 0.02 # the sparsity may have certain range of variations self.sparse_valid_max_weight = 0.20 # if max network weight is less than this value, suppress operation stop temporarily self.add_noise_thd = 0.50 # if network weight is more than this value, noise is forced - self.noise_volume = 0.01 # noise volume 0.01 + self.noise_volume = 0.1 # noise volume 0.1 self.base_ground_thd = 0.0000001 # if network weight is less than this value, will be considered as 0 self.model = None # SuppressModel instance self.grads_mask_list = [] # list for Grad Mask Matrix tensor diff --git a/mindarmour/utils/_check_param.py b/mindarmour/utils/_check_param.py index d4147c1..139f173 100644 --- a/mindarmour/utils/_check_param.py +++ b/mindarmour/utils/_check_param.py @@ -212,8 +212,8 @@ def check_equal_shape(para_name1, value1, para_name2, value2): if value1.shape != value2.shape: msg = 'The shape of {0} must equal to the ' \ '{1}, but got {0} is {2}, ' \ - '{1} is {3}'.format(para_name1, para_name2, value1.shape[0], - value2.shape[0]) + '{1} is {3}'.format(para_name1, para_name2, value1.shape, + value2.shape) LOGGER.error(TAG, msg) raise ValueError(msg) return value1, value2