Beispiel #1
0
 def initialize_computation():
     """Orchestration logic for server model initialization."""
     initial_global_model, initial_global_optimizer_state = tff.federated_eval(
         server_init, tff.SERVER)
     return tff.federated_zip(
         ServerState(model=initial_global_model,
                     optimizer_state=initial_global_optimizer_state,
                     delta_aggregate_state=aggregation_process.initialize(),
                     model_broadcast_state=broadcast_process.initialize()))
Beispiel #2
0
 def initialize_comp():
   if not isinstance(stateful_fn.initialize, tff.Computation):
     initialize = tff.tf_computation(stateful_fn.initialize)
   else:
     initialize = stateful_fn.initialize
   return tff.federated_eval(initialize, tff.SERVER)
Beispiel #3
0
 def init():
     return tff.federated_eval(create_dataset, tff.CLIENTS)
Beispiel #4
0
 def init():
     return tff.federated_eval(make_zero, tff.SERVER)
Beispiel #5
0
 def initialize_computation():
     """Orchestration logic for server model initialization."""
     return tff.federated_eval(server_init, tff.SERVER)