4887ef8baecbf5315ec0f235e56a4f93cd05aad7,cleverhans/attacks_tf.py,,spm,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,1947
Before Change
preds_adv = model.get_logits(adv_xs[-1])
// Compute accuracy
accs.append(tf.count_nonzero(tf.equal(tf.argmax(y, axis=-1),
tf.argmax(preds_adv, axis=-1))) )
// Return the adv_x with worst accuracy
adv_xs = tf.stack(adv_xs)
accs = tf.stack(accs)
After Change
// We want the worst case sample, with the largest xent_loss
worst_sample_idx = tf.argmax(all_xents, axis=0) // B
batch_size = tf.shape(x)[0]
keys = tf.stack([
tf.range(batch_size, dtype=tf.int32),
tf.cast(worst_sample_idx, tf.int32)
], axis=1)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 2
Instances Project Name: tensorflow/cleverhans
Commit Name: 4887ef8baecbf5315ec0f235e56a4f93cd05aad7
Time: 2018-10-04
Author: nottombrown@gmail.com
File Name: cleverhans/attacks_tf.py
Class Name:
Method Name: spm
Project Name: theislab/scanpy
Commit Name: 5507dc3fa93540890d8b953db00de4dcdcbe6bdd
Time: 2020-06-16
Author: koncopd@gmail.com
File Name: scanpy/tools/_rank_genes_groups.py
Class Name: _RankGenes
Method Name: t_test
Project Name: tensorly/tensorly
Commit Name: 5b5f8c92c0ef04950753346f54765a2b743b9490
Time: 2021-02-25
Author: caglayan.tuna@irisa.fr
File Name: tensorly/tenalg/proximal.py
Class Name:
Method Name: hals_nnls_acc
Project Name: biolab/orange3
Commit Name: a1c9e902822e0dd6c33ac0a1b633de8737b1bf26
Time: 2016-10-14
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/widgets/classify/owclassificationtreegraph.py
Class Name: OWTreeGraph
Method Name: ctree