Skip to content

Commit

Permalink
Fix outdated evaluation docs (#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljanes committed Jun 17, 2022
1 parent b968639 commit be5a2da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/source/evaluation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ An evaluation function is any function that can take the current global model pa
x_val, y_val = x_train[45000:50000], y_train[45000:50000]
# The `evaluate` function will be called after every round
def evaluate(weights: fl.common.Weights) -> Optional[Tuple[float, float]]:
def evaluate(weights: fl.common.Weights) -> Optional[Tuple[float, Dict]]:
model.set_weights(weights) # Update model with the latest parameters
loss, accuracy = model.evaluate(x_val, y_val)
return loss, accuracy
return loss, {"accuracy": accuracy}
return evaluate
Expand Down

0 comments on commit be5a2da

Please sign in to comment.