我试图了解 tensorflow 联合。我指的是https://www.tensorflow.org/federated/tutorials/custom_federated_algorithms_2#gradient_descent_on_a_sequence_of_local_data站点。这里我不明白如何在这个函数中打印每个客户端传递的值?
SERVER_FLOAT_TYPE = tff.FederatedType(tf.float32, tff.SERVER, all_equal=True)
@tff.federated_computation(
SERVER_MODEL_TYPE, SERVER_FLOAT_TYPE, CLIENT_DATA_TYPE)
def federated_train(model, learning_rate, data):
return tff.federated_mean(
tff.federated_map(
local_train,
[tff.federated_broadcast(model),
tff.federated_broadcast(learning_rate),
data]))
还有谁能告诉我 tff.sequence_reduce 的用途是什么。
请帮忙。