Skip to content

Non-writable NumPy array for L1BrendelBethgeAttack and L2BrendelBethgeAttack #740

Open

Description

@lmsasu

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

Activity

  1. changed the title [-]Non-writable NumPy array for L1BrendelBethgeAttack[/-] [+]Non-writable NumPy array for L1BrendelBethgeAttack and L2BrendelBethgeAttack[/+] on Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions