-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 SecretFlow 中实现经典联邦策略 FedDYN #1235
base: main
Are you sure you want to change the base?
Conversation
I have read the CLA Document and I hereby sign the CLA |
Stale pull request message. Please comment to remove stale tag. Otherwise this pr will be closed soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
class FedDYN(BaseTorchModel): | ||
def initialize(self, *args, **kwargs): | ||
self.grad_l = self.model.get_gradients() # client gradient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里 self.grad_l 没用到
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果要记录梯度,可以直接在 train_step 中记录
|
||
|
||
class FedDYN(BaseTorchModel): | ||
def initialize(self, *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数可以改成 __init__(),里面只指定 alpha
Fixed: #992
Preamble
For Pull Request initiator, please read the following steps carefully. 请合并请求的发起人仔细阅读下列步骤。
If you are creating a
Pull Request
about listed topic below, please go the thePreview
tab and click the relative link:如果您要创建一个有关下列内容的的合并请求,请切换到
Preview
面板并点击下方相关的链接:Select a proper
Pull Request
template can accelarate the review process, thanks for your cooperation.选择一个正确的
合并请求
模版可以加速审查流程,谢谢您的配合If your
Pull Request
topic is not amoung the list above, please just delete all prepopulated template content.如果您的
合并请求
内容不在上述的列表里,请删除提前填入的模版内容。Thanks for your contribution to SecretFlow project
感谢您对于 SecretFlow 项目的贡献