flip.utils.model_weights_handling

Functions

get_model_weights_diff(→ nvflare.apis.dxo.DXO)

Compute the weights differences to send a weight update.

Module Contents

flip.utils.model_weights_handling.get_model_weights_diff(original_weights: collections.OrderedDict, new_weights: collections.OrderedDict, iterations: int) nvflare.apis.dxo.DXO[source]

Compute the weights differences to send a weight update.

Parameters:
  • original_weights (OrderedDict) – weights coming from the server (before training)

  • new_weights (OrderedDict) – weights coming out of the server (post training)

  • iterations (int) – number of iterations

Returns:

DXO – DXO containing the weight updates for the server.