-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b326cb0
commit 0b82795
Showing
4 changed files
with
174 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
from typing import Type | ||
|
||
from base.datasets_processing import DatasetManager | ||
|
||
|
||
class Attacker: | ||
name = "Attacker" | ||
|
||
def __init__(self): | ||
def __init__( | ||
self | ||
): | ||
pass | ||
|
||
def attack(self, **kwargs): | ||
def attack( | ||
self, | ||
**kwargs | ||
): | ||
pass | ||
|
||
def attack_diff(self): | ||
def attack_diff( | ||
self | ||
): | ||
pass | ||
|
||
@staticmethod | ||
def check_availability(gen_dataset, model_manager): | ||
def check_availability( | ||
gen_dataset: DatasetManager, | ||
model_manager: Type | ||
): | ||
return False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
from attacks.attack_base import Attacker | ||
|
||
|
||
class MIAttacker(Attacker): | ||
def __init__(self, **kwargs): | ||
class MIAttacker( | ||
Attacker | ||
): | ||
def __init__( | ||
self, | ||
**kwargs | ||
): | ||
super().__init__() | ||
|
||
|
||
class EmptyMIAttacker(MIAttacker): | ||
class EmptyMIAttacker( | ||
MIAttacker | ||
): | ||
name = "EmptyMIAttacker" | ||
|
||
def attack(self, **kwargs): | ||
def attack( | ||
self, | ||
**kwargs | ||
): | ||
pass |
Oops, something went wrong.