Harry24k / adversarial-attacks-pytorch

PyTorch implementation of adversarial attacks [torchattacks].
https://adversarial-attacks-pytorch.readthedocs.io/en/latest/index.html
MIT License
1.79k stars 338 forks source link

use SciPy > = 1.8.0 #61

Closed byerose closed 2 years ago

byerose commented 2 years ago

It is recommended to use SciPy > = 1.8.0 to be compatible with other algorithm libraries. The lower version of SciPy will cause the following statement to report an error.

#D:\anaconda3\envs\nn\Lib\site-packages\torchattacks\attacks\_differential_evolution.py
from scipy.optimize.optimize import _status_message

==> from scipy.optimize._optimize import _status_message Art has the same problem and is being modified.

CHENBIN99 commented 2 years ago

I have installed the scipy==1.8.0, but still have this error

ImportError: cannot import name '_status_message' from 'scipy.optimize.optimize'

do you know how to fix it?

Harry24k commented 2 years ago

Thank you! For compatibility with other scipy versions, I modified it as follows: https://github.com/Harry24k/adversarial-attacks-pytorch/commit/315913fd5c1d493d618c54dc27c64af1f5f34726 Please use v3.2.6.