Skip to content

Commit 57ff537

Browse files
committed
Added parameter checks for use_probability. Added nbviewer links to the readme.
Signed-off-by: Taesung Lee <[email protected]>
1 parent 110346f commit 57ff537

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

art/attacks/extraction/copycat_cnn.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,7 @@ def _check_params(self) -> None:
160160

161161
if not isinstance(self.nb_stolen, (int, np.int)) or self.nb_stolen <= 0:
162162
raise ValueError("The number of queries submitted to the victim classifier must be a positive integer.")
163+
164+
if not isinstance(self.use_probability, bool):
165+
raise ValueError("The argument `use_probability` has to be of type bool.")
166+

art/attacks/extraction/knockoff_nets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,3 +407,7 @@ def _check_params(self) -> None:
407407

408408
if not isinstance(self.verbose, bool):
409409
raise ValueError("The argument `verbose` has to be of type bool.")
410+
if not isinstance(self.use_probability, bool):
411+
raise ValueError("The argument `use_probability` has to be of type bool.")
412+
413+

notebooks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ architecture in Keras for the CIFAR-10 dataset.
159159

160160
## Model stealing / model theft / model extraction
161161

162-
[model-stealing-demo.ipynb](model-stealing-demo.ipynb) demonstrates model stealing attacks and a reverse sigmoid defense against them.
162+
[model-stealing-demo.ipynb](model-stealing-demo.ipynb) [[on nbviewer](https://nbviewer.jupyter.org/github/Trusted-AI/adversarial-robustness-toolbox/blob/main/notebooks/model-stealing-demo.ipynb)] demonstrates model stealing attacks and a reverse sigmoid defense against them.
163163

164164
## Poisoning
165165

0 commit comments

Comments
 (0)