diff --git a/README.md b/README.md index 732708b..78ff1de 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![lint](https://github.com/daisylab-bit/torchattack/actions/workflows/lint.yml/badge.svg)](https://github.com/daisylab-bit/torchattack/actions/workflows/lint.yml) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/daisylab-bit/torchattack)](https://github.com/daisylab-bit/torchattack/releases/latest) -A set of adversarial attacks implemented in PyTorch. For internal use, no support guaranteed. +A set of adversarial attacks in PyTorch. ```shell # Install from github source @@ -80,3 +80,8 @@ python -m pip install -e '.[dev]' ## License [MIT](LICENSE) + +## Related + +- [Harry24k/adversarial-attacks-pytorch](https://github.com/Harry24k/adversarial-attacks-pytorch) +- [Trusted-AI/adversarial-robustness-toolbox](https://github.com/Trusted-AI/adversarial-robustness-toolbox) diff --git a/src/torchattack/fgsm.py b/src/torchattack/fgsm.py index 1c4cd6a..539b4d1 100644 --- a/src/torchattack/fgsm.py +++ b/src/torchattack/fgsm.py @@ -17,11 +17,11 @@ def __init__( self, model: nn.Module, normalize: Callable[[torch.Tensor], torch.Tensor] | None, + device: torch.device | None = None, eps: float = 8 / 255, clip_min: float = 0.0, clip_max: float = 1.0, targeted: bool = False, - device: torch.device | None = None, ) -> None: """Initialize the FGSM attack.