File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
art/defences/preprocessor Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 15
15
16
16
from tqdm .auto import tqdm
17
17
18
+ import torch
19
+
18
20
import numpy as np
19
21
20
22
from art .defences .preprocessor .preprocessor import PreprocessorPyTorch
@@ -43,7 +45,7 @@ def __init__(
43
45
lamb : float = 0.5 ,
44
46
max_iter : int = 10 ,
45
47
channels_first : bool = True ,
46
- clip_values : "CLIP_VALUES_TYPE" | None = None ,
48
+ clip_values : "CLIP_VALUES_TYPE | None" = None ,
47
49
apply_fit : bool = False ,
48
50
apply_predict : bool = True ,
49
51
verbose : bool = False ,
@@ -80,8 +82,8 @@ def __init__(
80
82
self ._check_params ()
81
83
82
84
def forward (
83
- self , x : "torch.Tensor" , y : "torch.Tensor" | None = None
84
- ) -> tuple ["torch.Tensor" , "torch.Tensor" | None ]:
85
+ self , x : "torch.Tensor" , y : "torch.Tensor | None" = None
86
+ ) -> tuple ["torch.Tensor" , "torch.Tensor | None" ]:
85
87
"""
86
88
Apply total variance minimization to sample `x`.
87
89
You can’t perform that action at this time.
0 commit comments