def fed_server_initial_state(): state = tff.federated_eval(build_server_initial_state_comp(gan), tff.SERVER) server_initial_state = tff.federated_zip( gan_training_tf_fns.ServerState( state.generator_weights, state.discriminator_weights, state.counters, aggregation_state=gan.aggregation_process.initialize())) return server_initial_state
def fed_server_initial_state(): state = tff.federated_eval(build_server_initial_state_comp(gan), tff.SERVER) dp_averaging_state = ( state.dp_averaging_state if gan.dp_averaging_fn is None else gan.dp_averaging_fn.initialize()) server_initial_state = tff.federated_zip( gan_training_tf_fns.ServerState( state.generator_weights, state.discriminator_weights, state.counters, dp_averaging_state=dp_averaging_state)) return server_initial_state