KarhouTam / FL-bench

Benchmark of federated learning. Dedicated to the community. 🤗
MIT License
476 stars 73 forks source link

Modifying the model in the constants.py file reports an error. #93

Open llsteven opened 1 day ago

llsteven commented 1 day ago

For fedavg, fedmd method only modify model parameter will report error, such as model='res18', the error appears as: ==================== ERROR ====================
Given groups=1, weight of size [64, 3, 7, 7], expected input[32, 1, 28, 28] to
have 3 channels, but got 1 channels instead

Index

According to the principle of the algorithm there should not be an error, I tried to add breakpoints to debug the code still did not find the problem. How can this be solved?

Screenshots

image image

llsteven commented 1 day ago

image

KarhouTam commented 1 day ago

That's a bug. A check about input data channel should be added in model classes. I will fix it asap. Thanks for pointing out.

KarhouTam commented 1 day ago

Hi, @llsteven . It's fixed in 811a996

llsteven commented 1 day ago

Hi, @llsteven . It's fixed in 811a996

You're welcome. Will it be updated so that clients can set up personalized models?

KarhouTam commented 1 day ago

Not really. Because FL-bench doesn't support model heterogeneous algorithms (except FedMD).

llsteven commented 1 day ago

Not really. Because FL-bench doesn't support model heterogeneous algorithms (except FedMD).

OK,Thank you.