7c537572503ad61a9f09ac0a3d2e71833e5d09a9,tensorflow_privacy/privacy/membership_inference_attack/tf_estimator_evaluation_example.py,,main,#Any#,99

Before Change


    // Get a summary writer for the hook to write to tensorboard.
    // Can set summary_writer to None if not needed.
    if FLAGS.model_dir:
      summary_writer = tf.summary.FileWriter(FLAGS.model_dir)
    else:
      summary_writer = None
    mia_hook = MembershipInferenceTrainingHook(
        mnist_classifier, (train_data, train_labels), (test_data, test_labels),

After Change


      )
  att_types, att_slices, att_metrics, att_values = get_flattened_attack_metrics(
      attack_results)
  print("\n".join(["  %s: %.4f" % (", ".join([s, t, m]), v) for t, s, m, v in
                   zip(att_types, att_slices, att_metrics, att_values)]))

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tensorflow/privacy
Commit Name: 7c537572503ad61a9f09ac0a3d2e71833e5d09a9
Time: 2020-09-22
Author: shuangsong@google.com
File Name: tensorflow_privacy/privacy/membership_inference_attack/tf_estimator_evaluation_example.py
Class Name:
Method Name: main


Project Name: Kamnitsask/deepmedic
Commit Name: 383c49a1f80e1fa92b95b5e37db41d2b474cd16e
Time: 2019-07-24
Author: bernardo.marques@imperial.ac.uk
File Name: deepmedic/frontEnd/trainSession.py
Class Name: TrainSession
Method Name: run_session


Project Name: reinforceio/tensorforce
Commit Name: a911645cbfdf502f1d323cb9a8d18f1a781b11d7
Time: 2017-03-11
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/distributed_model.py
Class Name: DistributedModel
Method Name: __init__