-
🔭 I’m currently working on Federated Learning and LLMs
-
📫 How to reach me [email protected]
-
📫 My homepage zhenqinzq.cn
This repository contains the official implementation of the paper entitled with "FedAPEN: Personalized Cross-silo Federated Learning with Adaptability to Statistical Heterogeneity".
License: MIT License
🔭 I’m currently working on Federated Learning and LLMs
📫 How to reach me [email protected]
📫 My homepage zhenqinzq.cn
您好,我在尝试运行mutual算法时遇到了问题,运行命令为:
python main.py --algorithm "mutual" --dataset cifar-10 --iid 0
运行后报错:AttributeError,检查了一下代码,好像问题出在:
在recorder.py代码的第153行:
def eval(self, node):
if self.args.algorithm in ['learned_adaptive_training', 'equal_training', 'learned_adaptive', 'mutual', 'heuristic_mutual']:
self._eval_ensemble_model(node)
else:
self._eval_single_model(node)
在main.py中调用recorder.eval(node)时,mutual算法会调用self._eval_ensemble_model(node),
而在recorder.py代码的第92行:
def _eval_ensemble_model(self, node: Node):
node.private_model = node.private_model.to(node.device)
node.private_model.eval()
node.shared_model = node.shared_model.to(node.device)
node.shared_model.eval()
if node.args.algorithm in ['learned_adaptive_training', 'learned_adaptive', 'equal_training']:
weight_private = node.learned_weight_for_inference.cpu().item()
else:
raise AttributeError()
这里mutual算法调用了self._eval_ensemble_model(node),但却不在预设的算法类别中,因此报错AttributeError。
我的理解是原本的FML算法并没有ensemble的推断过程,所以应该让它调用self._eval_single_model(node)。我把'mutual'从recorder.py代码的第154行中移除后代码就能正确运行了。
另外,我还注意到上述地方中出现了几次'heuristic_mutual'的算法,但在trainer.py中却没有对应的算法实现,不知道是对应的算法有遗漏还是代码冗余?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.