We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The _calculate_model_delta() may need to be modified to the code below to satisfy running pFL, since the updated_model is a subset of the init_model:
_calculate_model_delta()
updated_model
init_model
def _calculate_model_delta(self, init_model, updated_model): if not isinstance(init_model, list): init_model = [init_model] updated_model = [updated_model] model_deltas = list() for model_index in range(len(init_model)): # model_delta = copy.deepcopy(init_model[model_index]) # for key in init_model[model_index].keys(): # model_delta[key] = updated_model[model_index][ # key] - init_model[model_index][key] # added by me, for pFL model_delta = copy.deepcopy(updated_model[model_index]) for key in updated_model[model_index].keys(): model_delta[key] = updated_model[model_index][ key] - init_model[model_index][key] model_deltas.append(model_delta) if len(model_deltas) > 1: return model_deltas else: return model_deltas[0]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
_calculate_model_delta()
may need to be modified to the code below to satisfy running pFL, since theupdated_model
is a subset of theinit_model
:The text was updated successfully, but these errors were encountered: