5e244791eff65cd5e0c0052a157b3fd962d089ab,examples/securenn/network_b.py,PredictionClient,receive_output,#PredictionClient#Any#Any#,162
Before Change
def receive_output(self, likelihoods: tf.Tensor, y_true: tf.Tensor) -> tf.Tensor:
with tf.name_scope("post-processing"):
prediction = tf.argmax(likelihoods, axis=1)
eq_values = tf.equal(prediction, tf.cast(y_true, tf.int64))
acc = tf.reduce_mean(tf.cast(eq_values, tf.float32))
op=[]
tf.print([], [y_true], summarize=self.BATCH_SIZE, message="EXPECT: ")
op=op
tf.print(op, [prediction], summarize=self.BATCH_SIZE, message="ACTUAL: ")
op=[op]
tf.print([op], [acc], summarize=self.BATCH_SIZE, message="Acuraccy: ")
return op
model_trainer = ModelTrainer()
prediction_client = PredictionClient()
After Change
def receive_output(self, likelihoods: tf.Tensor, y_true: tf.Tensor) -> tf.Tensor:
with tf.name_scope("post-processing"):
prediction = tf.argmax(likelihoods, axis=1)
eq_values = tf.equal(prediction, tf.cast(y_true, tf.int64))
acc = tf.reduce_mean(tf.cast(eq_values, tf.float32))
op = tf.print("Expected:", y_true, "\nActual:", prediction, "\nAccuracy:", acc)
return op
model_trainer = ModelTrainer()
prediction_client = PredictionClient()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 20
Instances
Project Name: mortendahl/tf-encrypted
Commit Name: 5e244791eff65cd5e0c0052a157b3fd962d089ab
Time: 2019-01-03
Author: bendecoste@gmail.com
File Name: examples/securenn/network_b.py
Class Name: PredictionClient
Method Name: receive_output
Project Name: mortendahl/tf-encrypted
Commit Name: 5e244791eff65cd5e0c0052a157b3fd962d089ab
Time: 2019-01-03
Author: bendecoste@gmail.com
File Name: examples/securenn/network_a.py
Class Name: PredictionClient
Method Name: receive_output
Project Name: mortendahl/tf-encrypted
Commit Name: 5e244791eff65cd5e0c0052a157b3fd962d089ab
Time: 2019-01-03
Author: bendecoste@gmail.com
File Name: examples/securenn/network_d.py
Class Name: PredictionClient
Method Name: receive_output
Project Name: mortendahl/tf-encrypted
Commit Name: 5e244791eff65cd5e0c0052a157b3fd962d089ab
Time: 2019-01-03
Author: bendecoste@gmail.com
File Name: examples/securenn/network_b.py
Class Name: PredictionClient
Method Name: receive_output