def init_fn():
     return intrinsics.federated_zip(
         (intrinsics.federated_eval(initial_state_fn,
                                    placements.SERVER),
          quantile_agg_process.initialize()))
 def comp():
   rand = computations.tf_computation(lambda: tf.random.normal([]))
   return intrinsics.federated_eval(rand, placements.CLIENTS)
 def comp():
   return_five = computations.tf_computation(lambda: 5)
   return intrinsics.federated_eval(return_five, placements.SERVER)
 def init_fn():
     """The `init` function for `tff.templates.IterativeProcess`."""
     zero = computations.tf_computation(lambda: [0, 0])
     return intrinsics.federated_eval(zero, placements.SERVER)
示例#5
0
 def initial_state_comp():
     return intrinsics.federated_eval(initial_state_fn, placements.SERVER)
示例#6
0
def _client_one():
    return intrinsics.federated_eval(
        computations.tf_computation(lambda: tf.constant(1, tf.int32)),
        placements.CLIENTS)