收集客户返回的权重而不进行汇总 [英] Collecting the weights returned by clients without aggregating them

查看:78
本文介绍了收集客户返回的权重而不进行汇总的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道最简单的方法来创建模型,使用联邦的tensorflow广播模型,运行一个周期并收集客户端返回的权重而不将它们与fedavg进行汇总.

I would like to know the easiest way to create a model, broadcast it with tensorflow federated, run a cycle and collect the weights returned by clients without aggregating them with the fedavg.

推荐答案

TFF提供了

TFF provides the tff.federated_collect intrinsic for this purpose; it materializes a stream of client data at the server.

将其关联到最普遍存在的联邦过程的一种简单方法是分叉

One easy way to wire this into the guts of a mostly-existing federated procedure would be to fork simple_fedavg, which I think is a reasonable starting point for working with TFF's lower-level capabilities.

这里有几件事要注意.首先,据我所知,没有一个生产"系统支持 federated_collect .其次,根据您的需求,可能有一个更简单,更直接的解决方案:只需自行返回客户权重即可.TFF运行时将具体化一个客户端权重的Python列表(我相信是张量很高的张量),您可以在该列表上执行任意python后处理.

There are a few things to note here. First, no 'production' system of which I am aware supports federated_collect. Second, depending on your desire, there is possibly an easier and more straightforward solution: just return the client weights themselves. The TFF runtime will materialize a Python list of client weights (as eager tensors I believe), on which you can perform arbitrary python postprocessing.

要从 simple_fedavg 到达此处,您将有效地

To get here from simple_fedavg, you would effectively return the client_outputs directly instead of passing them to tff.federated_mean. This would give you the client deltas (IE, the difference between the final client weights and the initial client weights); you could, however, simply modify client_update to avoid computing this difference if desired.

这篇关于收集客户返回的权重而不进行汇总的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆