Created
August 23, 2019 10:48
-
-
Save FrederikBussler/d23f24d667c9b7992fd2892488f45eb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_data(n_clients): | |
"""This is just to see the client data we're dealing with.""" | |
return X, y, X_test, y_test | |
def mean_square_error(y_pred, y): | |
""""Calculate MSE for whatever model you're using.""" | |
class Server: | |
"""Hold the private key. Decrypt the average gradient. This is for privacy.""" | |
class Client: | |
"""This will run your model and send updates to the server.""" | |
for i in range(n_iter): | |
# Now we can compute client gradients, and send them back up to the server. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment