c56e3db656f3db9a7316b41221571a82ff398a1a,tf_encrypted/keras/models/sequential_test.py,TestSequential,test_from_config,#TestSequential#,49
Before Change
with tfe.protocol.SecureNN():
tfe_model = tfe.keras.models.Sequential([])
tfe_model = tfe_model.from_config(k_config)
x = tfe.define_private_variable(input_data)
with tfe.Session() as sess:
sess.run(tf.global_variables_initializer())
tfe_model.set_weights(k_weights)
y = tfe_model(x)
actual = sess.run(y.reveal())
np.testing.assert_allclose(actual, expected, rtol=1e-2, atol=1e-4)
After Change
input_shape)
with tfe.protocol.SecureNN():
x = tfe.define_private_input(
"inputter",
lambda: tf.convert_to_tensor(input_data))
tfe_model = Sequential.from_config(k_config)
tfe_model.set_weights(k_weights)
y = tfe_model(x)
with KE.get_session() as sess:
actual = sess.run(y.reveal())
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: mortendahl/tf-encrypted
Commit Name: c56e3db656f3db9a7316b41221571a82ff398a1a
Time: 2019-07-08
Author: yann.dupis@gmail.com
File Name: tf_encrypted/keras/models/sequential_test.py
Class Name: TestSequential
Method Name: test_from_config
Project Name: mortendahl/tf-encrypted
Commit Name: c56e3db656f3db9a7316b41221571a82ff398a1a
Time: 2019-07-08
Author: yann.dupis@gmail.com
File Name: tf_encrypted/keras/models/sequential_test.py
Class Name: TestSequential
Method Name: test_model_from_config
Project Name: mortendahl/tf-encrypted
Commit Name: c56e3db656f3db9a7316b41221571a82ff398a1a
Time: 2019-07-08
Author: yann.dupis@gmail.com
File Name: tf_encrypted/keras/models/sequential_test.py
Class Name: TestSequential
Method Name: test_conv_model