Skip to content

Commit

Permalink
Merge pull request #1165 from gilfidel/master
Browse files Browse the repository at this point in the history
Fixed calculation of alternating sign of the jacobian augmentation update step
  • Loading branch information
jonasguan authored Jan 20, 2021
2 parents d8f5ef7 + 716422b commit 8c095c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cleverhans_tutorials/mnist_blackbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def train_sub(sess, x, y, bbox_preds, x_sub, y_sub, nb_classes,
if rho < data_aug - 1:
print("Augmenting substitute training data.")
# Perform the Jacobian augmentation
lmbda_coef = 2 * int(int(rho / 3) != 0) - 1
lmbda_coef = 2*int(int(rho/3)%2==0)-1
x_sub = jacobian_augmentation(sess, x, x_sub, y_sub, grads,
lmbda_coef * lmbda, aug_batch_size)

Expand Down

0 comments on commit 8c095c9

Please sign in to comment.