Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
simplymathematics committed Nov 29, 2023
1 parent 2cab18d commit 3eb34d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deckard/base/attack/attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def __call__(
end_timestamp = time()
else:
raise e

time_dict.update(
{
"adv_fit_time_per_sample": (end - start) / (len(samples) * 1e9),
Expand Down
1 change: 1 addition & 0 deletions deckard/base/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def __call__(self, data: list, model: object, library=None):
end_timestamp = time()
elif "should be the same" in str(e).lower():
import torch

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
data[0] = torch.from_numpy(data[0])
data[1] = torch.from_numpy(data[1])
Expand Down

0 comments on commit 3eb34d7

Please sign in to comment.