I am receiving following error while generating adversarial examples by any method
InvalidArgumentError: assertion failed: [] [Condition x <= y did not hold element-wise:x (Placeholder_173:0) = ] [[[[158 112 49]]]...] [y (Cast_6:0) = ] [1]
…
In the pull requests, I see that master branch has code which works with TF2. I am looking into how to use them.
I use a conda env with python 3.7.7 and tf 2.2. Then I pulled master branch from gihub celverhans. But, when I try to run…
I am trying to attack an ensemble of Keras models following the method proposed in this paper. In section 5, they note that the attack is of the form:
So, I moved on to create an ensemble of pretrained Keras MNIST models as follows:
def…
I am trying to install cleverhans verion 3.1.0 but getting following error
pip install cleverhans==3.1.0
Note: you may need to restart the kernel to use updated packages.
ERROR: Could not find a version that satisfies the requirement…
I try to install or use the cleverhans library with tensorflow but it fails. (Cleverhans 3.0.1)
I tried TF 1.12, 1.13, 1.15, 2.0, 2.3.1 but everytime another error occured when using the tutorial code.
For example:
TF 2.3.1 --> module 'tensorflow'…
I have an image classifier with 2 outputs. I'm trying to check the most important pixels in the image which if perturbed may impact the model output (pixel that has most influence on model output).
My last layer is as as follows:
model.add(Dense(2,…
Is there a way to load a pre-trained model.
I have tried the load("model.joblib") and save("model.joblib", model) functions but the loaded model only ha about 10% accuracy on the validation data, and successfully generates about 10% successful…
I am facing a strange problem when adversarially training a resnet-50, and I am not sure whether is's a logical error, or a bug somewhere in the code/libraries.
I am adversarially training a resnet-50 thats loaded from Keras, using the…
I'm trying to generate adversarial examples using the Cleverhans (FGSM) tutorials with Keras, but so far I have been unsuccessful. I'm using a the keras generator functionality to retrieve dataset images.(Python 3.7)
I'm fairly new at working with…
I have a problem running a modified code in the Cleverhans library. I'm trying to run a modified version of mnist_blackbox.py example. The inputs are 3*680*1 instead of 28*28*1. The x_adv_sub is a 1*680*1 tensor and are combined with x_test_rest_tf…
I am trying to activate an FGSM with a ResNet 50 with keras, but get an error:
ValueError: Shape must be rank 4 but is rank 5 for 'model_1/conv1_pad/Pad' (op: 'Pad') with input shapes: [2,1,224,224,3], [4,2].
My code is:
from…
My code is:
i = 0
fgsm = FastGradientMethod(wrap)
adv = fgsm.generate(x_test_tensor, **fgsm_params)
for adv_x in tf.unstack(adv):
img = tf.cast(adv_x, dtype=tf.uint8)
tf_image = tf.image.encode_jpeg(img)
…
I am having a problem while playing the following code given as example in Cleverhans Library :
The problem is on Line # 18 . When it plays it gives out an import error :
ImportError: cannot import name 'flags'
I have tried to see in the help and…
I want a code example to how to generate train data from clever hans' adversarial attacks.
adv_x = fgsm.generate_np(X_test, **fgsm_params)
This generates adversarial x data but how can I get y?
adv_pred = model.predict_classes(adv_x)
And this…
I am new to this stuff and trying to attack Random Forest with Black Box FGSM (from clever hans)
But I'm not sure how to implement it. They've a blackbox example for Mnist data but I dont understand where should I put my random forest and where…