Skip to content

Commit

Permalink
Fix error in exchanging model weights
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishad-M-I-M committed Sep 2, 2023
1 parent 5dac047 commit 43219e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src_python/fl_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def send_model(self):

weights_path = self.weights_path + 'weights_' + self.graph_id + '_' + self.partition_id + ".npy"

weights = np.array(self.MODEL.get_weights())
weights = self.MODEL.get_weights()

data = {"CLIENT_ID":self.partition_id,"WEIGHTS":weights,"NUM_EXAMPLES":self.graph_params[0]}

Expand Down
2 changes: 1 addition & 1 deletion src_python/fl_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def send_model(self, client_socket):
if self.ROUNDS == self.training_cycles:
self.stop_flag = True

weights = np.array(self.GLOBAL_WEIGHTS)
weights = self.GLOBAL_WEIGHTS

data = {"STOP_FLAG":self.stop_flag,"WEIGHTS":weights}

Expand Down

0 comments on commit 43219e5

Please sign in to comment.