Skip to content
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

How to adjust the model_list when changing the number of parities #17

Open
zjujy opened this issue Aug 23, 2024 · 0 comments
Open

How to adjust the model_list when changing the number of parities #17

zjujy opened this issue Aug 23, 2024 · 0 comments

Comments

@zjujy
Copy link

zjujy commented Aug 23, 2024

I tried to change k(the number of parities) from 2 to 4, and simply config the model as follows (copy the original model):
{
"epochs": 1,
"lr": 0.01,
"k": 4,
"batch_size": 1024,
"communication": {
"communication_protocol": "FedSGD",
"iteration_per_aggregation": 1
},
"dataset": {
"dataset_name": "mnist",
"num_classes": 10
},
"model_list": {
"0": {
"type": "MLP2",
"input_dim": 392,
"output_dim": 10,
"path": "random_1428_10"
},
"1": {
"type": "MLP2",
"input_dim": 392,
"output_dim": 10,
"path": "random_14
28_10"
},
"2": {
"type": "MLP2",
"input_dim": 392,
"output_dim": 10,
"path": "random_1428_10"
},
"3": {
"type": "MLP2",
"input_dim": 392,
"output_dim": 10,
"path": "random_14
28_10"
},
"apply_trainable_layer": 1,
"global_model": "ClassificationModelHostTrainableHead"
},
"defense": {
"name": "GaussianDP",
"parameters": {
"party": [
1
],
"dp_strength": 0.0001
}
},
"attack_list": {
"0": {
"name": "BatchLabelReconstruction",
"parameters": {
"party": [
0
],
"lr": 0.05,
"epochs": 10000
}
},
"1": {
"name": "DirectLabelScoring",
"parameters": {
"party": [
0
]
}
}
}
}
then I found the matrix shapes don't match
image
So I change the matrix shapes for all 4 models from 392*10 to 192 * 10, but it still does't work.
image
Could you please tell me how to modify the model list, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant