如何在联合的TensorFlow中节省重量
我只想在损失降低并重用它们进行评估时节省权重。
lowest_loss = Inf
if loss[round] < lowest_loss:
lowest_loss = loss[round]
model_weights = transfer_learning_iterative_process.get_model_weights(state)
eval_metric = federated_eval(model_weights, [fed_valid_data])
在哪里:
federated_eval = tff.learning.build_federated_evaluation(model_fn)
是否有可能将服务器权重以HDF5格式或检查点保存并重复使用?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这可以使用TFF中的帮助者来完成。通常,这种功能由
tff.program。 ProgramStateManagers
。可以找到保存到文件系统的实现,可以找到
tff.simulation.run_training_process
。Yes, this can be done with helpers in TFF. Generally, this kind of functionality is implemented by
tff.program.ProgramStateManagers
. An implementation which saves to a filesystem can be found here, and example usages can be found in the implementation oftff.simulation.run_training_process
.