Skip to content

Instantly share code, notes, and snippets.

@FrederikBussler
Created August 23, 2019 10:48
Show Gist options
  • Save FrederikBussler/d23f24d667c9b7992fd2892488f45eb3 to your computer and use it in GitHub Desktop.
Save FrederikBussler/d23f24d667c9b7992fd2892488f45eb3 to your computer and use it in GitHub Desktop.
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