Skip to content

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

@zjujy

Description

@zjujy

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions