return op
model_trainer = ModelTrainer(config.get_player("model-trainer"))
prediction_client = PredictionClient(config.get_player("prediction-client"))
server0 = config.get_player("server0")
server1 = config.get_player("server1")
crypto_producer = config.get_player("crypto-producer")
with tfe.protocol.Pond(server0, server1, crypto_producer) as prot:
// get model parameters as private tensors from model owner
params = prot.define_private_input(model_trainer.player, model_trainer.provide_input, masked=True) // pylint: disable=E0632
// we"ll use the same parameters for each prediction so we cache them to avoid re-training each time
params = prot.cache(params)
After Change
model_trainer = ModelTrainer()
prediction_client = PredictionClient()
// get model parameters as private tensors from model owner
params = tfe.define_private_input("model-trainer", model_trainer.provide_input, masked=True) // pylint: disable=E0632