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: 4

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: 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__


Project Name: GPflow/GPflow
Commit Name: b78c1a89a4819cf246aae0724f934349861916cd
Time: 2018-07-10
Author: mikhailbeck@gmail.com
File Name: gpflow/training/monitor.py
Class Name: BaseTensorBoardTask
Method Name: __init__


Project Name: NifTK/NiftyNet
Commit Name: b263ab3a2904ee85910623cd770eb6763d81e4a9
Time: 2018-04-24
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/event_tensorboard.py
Class Name: TensorBoardLogger
Method Name: __init__