Skip to content

Commit

Permalink
chore: python 3.12 update, close #2
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Feb 26, 2024
1 parent 6f18a45 commit 106932b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

# Load a model
model = resnet50(weights='DEFAULT')
model = model.to(device)
model = model.eval().to(device)

# Define normalization (you are responsible for normalizing the data if needed)
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[project]
name = "torchattack"
version = "0.3.0"
description = "A set of adversarial attacks implemented in PyTorch"
authors = [{ name = "spencerwooo", email = "[email protected]" }]
requires-python = ">=3.10,<3.12"
requires-python = ">=3.10,<3.13"
readme = "README.md"
license = { text = "MIT" }
dependencies = [
Expand All @@ -13,14 +12,16 @@ dependencies = [
"scipy>=1.10.1",
"rich>=13.3.5",
]

[project.optional-dependencies]
dev = ["mypy"]
dynamic = ["version"]
optional-dependencies = { dev = ["mypy"] }

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
version = { attr = "torchattack.__version__" }

[tool.ruff]
line-length = 88
select = ["E", "F", "I", "N", "B", "SIM"]
Expand Down
2 changes: 2 additions & 0 deletions src/torchattack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from torchattack.vmifgsm import VMIFGSM
from torchattack.vnifgsm import VNIFGSM

__version__ = '0.4.0'

__all__ = [
'Admix',
'DeepFool',
Expand Down

0 comments on commit 106932b

Please sign in to comment.