5e381ffa82b6e515697c3c2f9ed3dffe768af37a,examples/mnist/run.py,,,#,169

Before Change


    model.add(tfe.keras.layers.Dense(10, activation=None))

    // get prediction input from client
    x = tfe.define_private_input(prediction_client.player_name,
                                 prediction_client.provide_input)
    logits = model(x)

  // send prediction output back to client
  prediction_op = tfe.define_output(prediction_client.player_name,
                                    logits,
                                    prediction_client.receive_output)

  sess = tfe.Session(target=session_target)
  sess.run(tf.global_variables_initializer(), tag="init")

After Change



  with tfe.protocol.SecureNN():
    // get prediction input from client
    x = prediction_client.provide_input()

    model = tfe.keras.Sequential()
    model.add(tfe.keras.layers.Dense(512, batch_input_shape=x.shape))
    model.add(tfe.keras.layers.Activation("relu"))
    model.add(tfe.keras.layers.Dense(10, activation=None))

    logits = model(x)

  // send prediction output back to client
  prediction_op = prediction_client.receive_output(logits)

  with tfe.Session(target=session_target) as sess:
    sess.run(tf.global_variables_initializer(), tag="init")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: mortendahl/tf-encrypted
Commit Name: 5e381ffa82b6e515697c3c2f9ed3dffe768af37a
Time: 2019-07-11
Author: jason@dropoutlabs.com
File Name: examples/mnist/run.py
Class Name:
Method Name:


Project Name: mortendahl/tf-encrypted
Commit Name: 5e381ffa82b6e515697c3c2f9ed3dffe768af37a
Time: 2019-07-11
Author: jason@dropoutlabs.com
File Name: examples/logistic/prediction_single.py
Class Name:
Method Name:


Project Name: mortendahl/tf-encrypted
Commit Name: 5e381ffa82b6e515697c3c2f9ed3dffe768af37a
Time: 2019-07-11
Author: jason@dropoutlabs.com
File Name: examples/mnist/run.py
Class Name:
Method Name:


Project Name: mortendahl/tf-encrypted
Commit Name: 5e381ffa82b6e515697c3c2f9ed3dffe768af37a
Time: 2019-07-11
Author: jason@dropoutlabs.com
File Name: examples/logistic/prediction_joint.py
Class Name:
Method Name: