Non-writable NumPy array for L1BrendelBethgeAttack and L2BrendelBethgeAttack
- Dominant language
- Python
- Stars
- 3k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
The L1BrendelBethgeAttack and L2BrendelBethgeAttack attack strategies issues an error when it is called:
`The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. You may want to copy the array to protect its data or make it writable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:206.)
`
**To Reproduce**
Init L1BrendelBethgeAttack and L2BrendelBethgeAttack with default params.
**Software (please complete the following information):**
torch version: 2.4.0+cu124
Foolbox version: 3.3.4
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue by initializing L1BrendelBethgeAttack and L2BrendelBethgeAttack with their default parameters using PyTorch 2.4.0 and Foolbox 3.3.4. Trace the NumPy-to-PyTorch conversion used by these attack strategies and verify that the default calls complete without the non-writable-array warning or error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100