Skip to content

Commit

Permalink
update androidhelper
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasakesson committed Jan 12, 2024
2 parents d07f08e + 764bd5f commit 3655925
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fedn/fedn/utils/plugins/androidhelper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import os
import struct
import tempfile
Expand All @@ -17,6 +16,7 @@ def __init__(self):
super().__init__()

# function to calculate an incremental weighted average of the weights

def increment_average(
self, model, model_next, num_examples, total_examples
):
Expand Down Expand Up @@ -74,7 +74,7 @@ def save(self, weights, path=None):
if not path:
path = self.get_tmp_path()

byte_array = struct.pack("f"*len(weights),*weights)
byte_array = struct.pack("f"*len(weights), *weights)
with open(path, "wb") as file:
file.write(byte_array)

Expand Down

0 comments on commit 3655925

Please sign in to comment.