The issue tracker should only be used to report bugs or feature requests. If you are looking for support from other library users, please ask a question on StackOverflow.
Describe the bug
If an argument for parameter y is provided in the function carlini_wagner_l2, the error below is raised, and the only way to avoid this is to set argument batch_size equal to the number of samples in y.
CarliniWagnerL2Exception: x and y do not have the same shape!
To Reproduce
import tensorflow as tf
from cleverhans.tf2.attacks.carlini_wagner_l2 import carlini_wagner_l2
(x, y), _ = tf.keras.datasets.cifar10.load_data()
x = tf.image.convert_image_dtype(y, dtype=tf.float32)
# <load model here>
x_adv = carlini_wagner_l2(classifier, x=x[:8], y=y[:8], max_iterations=10, batch_size=4) # arguments chosen for time concerns
Expected behavior
Just like x, the argument y should be split into batches.
The issue tracker should only be used to report bugs or feature requests. If you are looking for support from other library users, please ask a question on StackOverflow.
Describe the bug If an argument for parameter
y
is provided in the functioncarlini_wagner_l2
, the error below is raised, and the only way to avoid this is to set argumentbatch_size
equal to the number of samples iny
.CarliniWagnerL2Exception: x and y do not have the same shape!
To Reproduce
Expected behavior Just like
x
, the argumenty
should be split into batches.