Skip to content

Commit

Permalink
fix data types from int to float
Browse files Browse the repository at this point in the history
  • Loading branch information
ain-soph committed May 26, 2022
1 parent 0fde5da commit fb68f5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion trojanvision/configs/defense/neuron_inspect.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lambd_sp: 1.e-6
lambd_sm: 1.e-6
lambd_pe: 1
lambd_pe: 1.
thre: 1.e-5

sample_ratio: 0.1
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def add_argument(cls, group: argparse._ArgumentGroup):
group.add_argument('--sample_ratio', type=float, help='sample ratio from the full training data')
return group

def __init__(self, lambd_sp: float = 1e-5, lambd_sm: float = 1e-5, lambd_pe: float = 1,
thre: float = 0, sample_ratio: float = 0.1, **kwargs):
def __init__(self, lambd_sp: float = 1e-5, lambd_sm: float = 1e-5, lambd_pe: float = 1.,
thre: float = 0., sample_ratio: float = 0.1, **kwargs):
super().__init__(**kwargs)
self.param_list['neuron_inspect'] = ['lambd_sp', 'lambd_sm', 'lambd_pe', 'thre', 'sample_ratio']

Expand Down

0 comments on commit fb68f5f

Please sign in to comment.