Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_parameters(self, conn):
with self.lock:
weights = self.model.get_weights()
send(conn, weights)
def get_parameters(self, socket):
with self.lock:
weights = self.model.get_weights()
send(socket, weights)
def update_parameters(self, delta):
data = {'delta': delta}
self.socket.sendall(b'u')
send(self.socket, data)