TFF:两种类型有什么区别?
TFF: What is difference between two type?
collected_output=tff.federated_collect(client_outputs)
。
详细代码请参考这个
我的问题是照片上标红的部分有什么区别。在 FL 算法方面,我认为 client_outputs
是单个客户端的输出,而 collected_output
是 SequenceType
,因为每个 client_outputs
是组合的。这个对吗?如果我的猜测是正确的,member
是一组具有 client_outputs
的个人客户成员吗?
术语可能有点棘手。 client_outputs
不完全是“个人客户的输出”,它仍然代表 所有 客户输出,但它们不可单独寻址。重要的是,TFF 区分数据存在(“放置”)在客户端,它没有被传达。 collected_outputs
在某种意义上是所有单个客户端输出的流,尽管 placement 已通过 tff.federated_collect
.[= 更改(值已传达)到服务器28=]
更详细一点:
在上面的类型规范中,.member
是 tff.FederatedType
. The TFF Guide Federated Core > Type System 上的一个属性,是有关不同 TFF 类型的更多详细信息的好资源。
{int32}@CLIENTS
represents a federated value that consists of a set of potentially distinct integers, one per client device. Note that we are talking about a single federated value as encompassing multiple items of data that appear in multiple locations across the network. One way to think about it is as a kind of tensor with a "network" dimension, although this analogy is not perfect because TFF does not permit random access to member constituents of a federated value.
在屏幕截图中,client_outputs
也被“放置”在 @CLIENTS
(来自 .placement
属性)并遵循类似的语义:它有多个值(每个客户端一个)但单独值不可寻址(即值的行为不像 Python list
)。
相比之下,collected_output
被放置在@SERVER
。那么这个项目符号:
<weights=float32[10,5],bias=float32[5]>@SERVER
represents a named tuple of weight and bias tensors at the server. Since we've dropped the curly braces, this indicates the all_equal bit is set, i.e., there's only a single tuple (regardless of how many server replicas there might be in a cluster hosting this value).
注意“single 元组”短语,在 tff.federated_collect
之后服务器上放置了一个值序列。这个序列可以像 stream.
一样迭代
collected_output=tff.federated_collect(client_outputs)
。
详细代码请参考这个
我的问题是照片上标红的部分有什么区别。在 FL 算法方面,我认为 client_outputs
是单个客户端的输出,而 collected_output
是 SequenceType
,因为每个 client_outputs
是组合的。这个对吗?如果我的猜测是正确的,member
是一组具有 client_outputs
的个人客户成员吗?
术语可能有点棘手。 client_outputs
不完全是“个人客户的输出”,它仍然代表 所有 客户输出,但它们不可单独寻址。重要的是,TFF 区分数据存在(“放置”)在客户端,它没有被传达。 collected_outputs
在某种意义上是所有单个客户端输出的流,尽管 placement 已通过 tff.federated_collect
.[= 更改(值已传达)到服务器28=]
更详细一点:
在上面的类型规范中,.member
是 tff.FederatedType
. The TFF Guide Federated Core > Type System 上的一个属性,是有关不同 TFF 类型的更多详细信息的好资源。
{int32}@CLIENTS
represents a federated value that consists of a set of potentially distinct integers, one per client device. Note that we are talking about a single federated value as encompassing multiple items of data that appear in multiple locations across the network. One way to think about it is as a kind of tensor with a "network" dimension, although this analogy is not perfect because TFF does not permit random access to member constituents of a federated value.
在屏幕截图中,client_outputs
也被“放置”在 @CLIENTS
(来自 .placement
属性)并遵循类似的语义:它有多个值(每个客户端一个)但单独值不可寻址(即值的行为不像 Python list
)。
相比之下,collected_output
被放置在@SERVER
。那么这个项目符号:
<weights=float32[10,5],bias=float32[5]>@SERVER
represents a named tuple of weight and bias tensors at the server. Since we've dropped the curly braces, this indicates the all_equal bit is set, i.e., there's only a single tuple (regardless of how many server replicas there might be in a cluster hosting this value).
注意“single 元组”短语,在 tff.federated_collect
之后服务器上放置了一个值序列。这个序列可以像 stream.