4887ef8baecbf5315ec0f235e56a4f93cd05aad7,cleverhans/attacks_tf.py,,spm,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,1947

Before Change



  // Perform the transformation
  for (dx, dy, angle) in transforms:
    adv_xs.append(_apply_transformation(x, dx, dy, angle, batch_size))
    preds_adv = model.get_logits(adv_xs[-1])

    // Compute accuracy
    accs.append(tf.count_nonzero(tf.equal(tf.argmax(y, axis=-1),

After Change


      tf.range(batch_size, dtype=tf.int32),
      tf.cast(worst_sample_idx, tf.int32)
  ], axis=1)
  transformed_ims_bshwc = tf.einsum("sbhwc->bshwc", transformed_ims)
  after_lookup = tf.gather_nd(transformed_ims_bshwc, keys)  // BHWC
  return after_lookup

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: dmlc/dgl
Commit Name: f5eb80d221fec8690e8cfb087256671545bb9a5a
Time: 2020-08-11
Author: coin2028@hotmail.com
File Name: examples/pytorch/gcmc/model.py
Class Name: DenseBiDecoder
Method Name: forward


Project Name: apache/incubator-mxnet
Commit Name: e2624551616e930f4106e7366568572208994740
Time: 2019-10-26
Author: fhztc1997618@gmail.com
File Name: tests/python/unittest/test_numpy_op.py
Class Name:
Method Name: test_np_einsum