Catalog PyPI
PACKAGE EXPLORERView in registry

adversarialtorchattacks

PyPI

A PyTorch package for adversarial attacks (FGSM, PGD, CW, MIFGSM, AutoAttack) with visualization.

Versions collected1
Direct dependencies4From release 1.0.0
Last observed20 Oct, 20:03 UTC

README

Version 1.0.0 documentation

📦 Installation

Install the package via pip:

pip install adversarialpytorchattack

## 📦 Or installation using Github 
Or install from source
```sh
git clone https://github.com/santhoshatwork17@gmail.com/adversarialpytorchattackers.git
cd adversarial_pytorch_attack


## 🛠️ Usage
```python
import torch
import torchvision.models as models
from adversarialpytorchattack.attacks import FGSM, PGD, CW
from adversarialpytorchattack.utils import visualize_perturbation, save_image

# pre-trained model
model = models.resnet18(pretrained=True).eval()

# input image
image = torch.rand((1, 3, 224, 224))  # Example input
label = torch.tensor([0])  # Example label

# Apply attack
fgsm_attack = FGSM(model, epsilon=0.03)
adv_image = fgsm_attack(image, label)

# Save the adversarial image
save_image(adv_image, "adv_fgsm.jpg")

Downloads & popularity

2downloads
1-day window · source-reported counts20 Oct 2026
46230
2026-07-23: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-07-23–2026-07-232026-07-24: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-07-24–2026-07-242026-07-27: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-07-27–2026-07-272026-07-28: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-07-28–2026-07-282026-08-01: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-02–2026-08-022026-08-03: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-03–2026-08-032026-08-09: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-09–2026-08-092026-08-10: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-10–2026-08-102026-08-13: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-13–2026-08-132026-08-14: 4 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-14–2026-08-142026-08-16: 17 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-16–2026-08-162026-08-17: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-17–2026-08-172026-08-20: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-20–2026-08-202026-08-21: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-21–2026-08-212026-08-23: 4 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-23–2026-08-232026-08-24: 8 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-24–2026-08-242026-08-28: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-28–2026-08-282026-08-30: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-30–2026-08-302026-08-31: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-08-31–2026-08-312026-09-01: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-01–2026-09-012026-09-03: 3 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-03–2026-09-032026-09-07: 3 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-07–2026-09-072026-09-09: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-09–2026-09-092026-09-11: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-11–2026-09-112026-09-12: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-12–2026-09-122026-09-15: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-15–2026-09-152026-09-22: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-22–2026-09-222026-09-23: 3 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-23–2026-09-232026-09-24: 3 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-24–2026-09-242026-09-25: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-25–2026-09-252026-09-26: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-26–2026-09-262026-09-27: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-27–2026-09-272026-09-30: 3 · observed 2026-10-21T12:28:25.3983301Z · period 2026-09-30–2026-09-302026-10-02: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-02–2026-10-022026-10-06: 3 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-06–2026-10-062026-10-08: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-08–2026-10-082026-10-09: 4 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-09–2026-10-092026-10-11: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-11–2026-10-112026-10-13: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-13–2026-10-132026-10-14: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-14–2026-10-142026-10-15: 14 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-15–2026-10-152026-10-16: 46 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-16–2026-10-162026-10-17: 4 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-17–2026-10-172026-10-18: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-18–2026-10-182026-10-19: 1 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-19–2026-10-192026-10-20: 2 · observed 2026-10-21T12:28:25.3983301Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 47 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2022026-10-21T12:28:25.3983301Z
2026-10-19 – 2026-10-1912026-10-21T12:28:25.3983301Z
2026-10-18 – 2026-10-1812026-10-21T12:28:25.3983301Z
2026-10-17 – 2026-10-1742026-10-21T12:28:25.3983301Z
2026-10-16 – 2026-10-16462026-10-21T12:28:25.3983301Z
2026-10-15 – 2026-10-15142026-10-21T12:28:25.3983301Z
2026-10-14 – 2026-10-1412026-10-21T12:28:25.3983301Z
2026-10-13 – 2026-10-1312026-10-21T12:28:25.3983301Z
2026-10-11 – 2026-10-1122026-10-21T12:28:25.3983301Z
2026-10-09 – 2026-10-0942026-10-21T12:28:25.3983301Z
2026-10-08 – 2026-10-0822026-10-21T12:28:25.3983301Z
2026-10-06 – 2026-10-0632026-10-21T12:28:25.3983301Z
2026-10-02 – 2026-10-0212026-10-21T12:28:25.3983301Z
2026-09-30 – 2026-09-3032026-10-21T12:28:25.3983301Z
2026-09-27 – 2026-09-2712026-10-21T12:28:25.3983301Z
2026-09-26 – 2026-09-2612026-10-21T12:28:25.3983301Z
2026-09-25 – 2026-09-2522026-10-21T12:28:25.3983301Z
2026-09-24 – 2026-09-2432026-10-21T12:28:25.3983301Z
2026-09-23 – 2026-09-2332026-10-21T12:28:25.3983301Z
2026-09-22 – 2026-09-2222026-10-21T12:28:25.3983301Z
2026-09-15 – 2026-09-1512026-10-21T12:28:25.3983301Z
2026-09-12 – 2026-09-1222026-10-21T12:28:25.3983301Z
2026-09-11 – 2026-09-1112026-10-21T12:28:25.3983301Z
2026-09-09 – 2026-09-0912026-10-21T12:28:25.3983301Z
2026-09-07 – 2026-09-0732026-10-21T12:28:25.3983301Z
2026-09-03 – 2026-09-0332026-10-21T12:28:25.3983301Z
2026-09-01 – 2026-09-0112026-10-21T12:28:25.3983301Z
2026-08-31 – 2026-08-3122026-10-21T12:28:25.3983301Z
2026-08-30 – 2026-08-3012026-10-21T12:28:25.3983301Z
2026-08-28 – 2026-08-2812026-10-21T12:28:25.3983301Z
2026-08-24 – 2026-08-2482026-10-21T12:28:25.3983301Z
2026-08-23 – 2026-08-2342026-10-21T12:28:25.3983301Z
2026-08-21 – 2026-08-2112026-10-21T12:28:25.3983301Z
2026-08-20 – 2026-08-2012026-10-21T12:28:25.3983301Z
2026-08-17 – 2026-08-1722026-10-21T12:28:25.3983301Z
2026-08-16 – 2026-08-16172026-10-21T12:28:25.3983301Z
2026-08-14 – 2026-08-1442026-10-21T12:28:25.3983301Z
2026-08-13 – 2026-08-1322026-10-21T12:28:25.3983301Z
2026-08-10 – 2026-08-1012026-10-21T12:28:25.3983301Z
2026-08-09 – 2026-08-0912026-10-21T12:28:25.3983301Z
2026-08-03 – 2026-08-0322026-10-21T12:28:25.3983301Z
2026-08-02 – 2026-08-0212026-10-21T12:28:25.3983301Z
2026-08-01 – 2026-08-0112026-10-21T12:28:25.3983301Z
2026-07-28 – 2026-07-2812026-10-21T12:28:25.3983301Z
2026-07-27 – 2026-07-2722026-10-21T12:28:25.3983301Z
2026-07-24 – 2026-07-2412026-10-21T12:28:25.3983301Z
2026-07-23 – 2026-07-2322026-10-21T12:28:25.3983301Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.03 Mar 20254

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
santhosh1705kumar/adversarialpytorchattackers

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:03 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2957db5c7d89b22eec243420c1eb8d0d3792e416209c8155806ec059d6b7569b