def agg_next_fn(state, value, weight): @tff.tf_computation(tf.int32) def add_one(value): return value + 1 return { 'call_count': tff.federated_apply(add_one, state.call_count), }, tff.federated_mean(value, weight)
def _(x, y): return tff.federated_mean(x, y)
def foo(x, y): return tff.federated_mean(x, y)