---
# System prepended metadata

title: Optimizing Federated Learning on Non-IID Data with Reinforcement Learning - 參數設定 & 實驗結果 (2023/04/29 更新)
tags: [Paper]

---

# Optimizing Federated Learning on Non-IID Data with Reinforcement Learning - 參數設定 & 實驗結果 (2023/04/29 更新)

###### tags: `Paper`

## 參數設定
- clients
    - total : 總客戶數
    - per_round : 每回合抓多少客戶參與訓練
    - label_distribution : 資料分布狀態
    - do_test : 是否做測試
    - test_partition : 測試資料佔的比例

- data
    - loading : 資料載入方式 (靜態 / 動態)
    - partition : 資料大小
    - IID : 是否為 IID 
    - bias : 偏移比例

- federated_learning
    - rounds : FL 訓練次數
    - target_accuracy : 目標準確度
    - task : 目前執行工作 (train / test)
    - epochs : 在客戶端上要訓練幾個回合
    - batch_size : batch 大小

- model : 根據不同的資料集，分成了 3 種不同的模型架構

## 實驗結果
### 實驗環境
CPU : Intel® Core™ i7-9700 CPU @ 3.00GHz × 8

RAM : 16 GB

GPU : 
```python
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.105.17   Driver Version: 525.105.17   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| 56%   72C    P0    40W / 120W |   1136MiB /  6144MiB |     30%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1639      G   /usr/lib/xorg/Xorg                106MiB |
|    0   N/A  N/A      1797      G   /usr/bin/gnome-shell               32MiB |
|    0   N/A  N/A      2860      G   ...9/usr/lib/firefox/firefox      152MiB |
|    0   N/A  N/A     46357      C   python                            840MiB |
+-----------------------------------------------------------------------------+

```

### Dataset : MNIST

#### EX 1-1 : FedAvg MNIST IID
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": true
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.99,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "MNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 51
target accuracy : 99%
test accuracy : 99.00%

```python=
[INFO][06:15:52]: **** Round 51/10000 ****
[INFO][06:15:52]: Training on client #9
[INFO][06:15:52]: Training on client #47
[INFO][06:15:52]: Training on client #7
[INFO][06:15:52]: Training on client #23
[INFO][06:15:52]: Training on client #31
[INFO][06:15:52]: Training on client #37
[INFO][06:15:52]: Training on client #5
[INFO][06:15:52]: Training on client #46
[INFO][06:15:52]: Training on client #40
[INFO][06:15:52]: Training on client #56
[INFO][06:15:54]: Reports recieved: 10
[INFO][06:15:54]: Aggregating updates
[INFO][06:15:54]: Saved global model: ./models/MNIST/global
[INFO][06:15:55]: Average accuracy: 99.00%

[INFO][06:15:55]: Target accuracy reached.
```

#### EX 1-2 : FedAvg MNIST non-IID(80/20)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.8,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.99,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "MNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 175
target accuracy : 99%
test accuracy : 99.01%

```python=
[INFO][12:50:38]: **** Round 175/10000 ****
[INFO][12:50:38]: Training on client #9
[INFO][12:50:38]: Training on client #4
[INFO][12:50:38]: Training on client #65
[INFO][12:50:38]: Training on client #74
[INFO][12:50:38]: Training on client #70
[INFO][12:50:38]: Training on client #76
[INFO][12:50:38]: Training on client #73
[INFO][12:50:38]: Training on client #97
[INFO][12:50:38]: Training on client #95
[INFO][12:50:38]: Training on client #36
[INFO][12:50:40]: Reports recieved: 10
[INFO][12:50:40]: Aggregating updates
[INFO][12:50:40]: Saved global model: ./models/MNIST/global
[INFO][12:50:42]: Average accuracy: 99.01%

[INFO][12:50:42]: Target accuracy reached.
```

#### EX 1-3 : FedAvg MNIST non-IID(50/50)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.5,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.99,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "MNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 78
target accuracy : 99%
test accuracy : 99.04%

```python=
[INFO][02:07:47]: **** Round 78/10000 ****
[INFO][02:07:47]: Training on client #69
[INFO][02:07:47]: Training on client #68
[INFO][02:07:47]: Training on client #4
[INFO][02:07:47]: Training on client #75
[INFO][02:07:47]: Training on client #85
[INFO][02:07:47]: Training on client #71
[INFO][02:07:47]: Training on client #79
[INFO][02:07:47]: Training on client #23
[INFO][02:07:47]: Training on client #84
[INFO][02:07:47]: Training on client #12
[INFO][02:07:49]: Reports recieved: 10
[INFO][02:07:49]: Aggregating updates
[INFO][02:07:49]: Saved global model: ./models/MNIST/global
[INFO][02:07:50]: Average accuracy: 99.04%

[INFO][02:07:50]: Target accuracy reached.
```

#### EX 1-4 : FedAvg MNIST non-IID(20/80)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.2,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.99,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "MNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 49
target accuracy : 99%
test accuracy : 99.00%

```python=
[INFO][02:18:33]: **** Round 49/10000 ****
[INFO][02:18:33]: Training on client #17
[INFO][02:18:33]: Training on client #82
[INFO][02:18:33]: Training on client #30
[INFO][02:18:33]: Training on client #14
[INFO][02:18:33]: Training on client #63
[INFO][02:18:33]: Training on client #83
[INFO][02:18:33]: Training on client #72
[INFO][02:18:33]: Training on client #24
[INFO][02:18:33]: Training on client #93
[INFO][02:18:33]: Training on client #13
[INFO][02:18:35]: Reports recieved: 10
[INFO][02:18:35]: Aggregating updates
[INFO][02:18:35]: Saved global model: ./models/MNIST/global
[INFO][02:18:36]: Average accuracy: 99.00%

[INFO][02:18:36]: Target accuracy reached.
```

#### EX 1-5 : kcenter MNIST IID
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": true

    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.99,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "MNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 41
target accuracy : 99%
test accuracy : 99.03%

```python=
[INFO][03:06:30]: **** Round 41/10000 ****
[WARNING][03:06:30]: Not enough unused clients
[WARNING][03:06:30]: Dumping clients for reuse
[INFO][03:06:30]: KCenter: 100 clients, 10 centers
[INFO][03:06:31]: Training on client #67
[INFO][03:06:31]: Training on client #90
[INFO][03:06:31]: Training on client #70
[INFO][03:06:31]: Training on client #50
[INFO][03:06:31]: Training on client #69
[INFO][03:06:31]: Training on client #15
[INFO][03:06:31]: Training on client #96
[INFO][03:06:31]: Training on client #14
[INFO][03:06:31]: Training on client #43
[INFO][03:06:31]: Training on client #63
[INFO][03:06:32]: Reports recieved: 10
[INFO][03:06:32]: Aggregating updates
[INFO][03:06:32]: Saved global model: ./models/MNIST/global
[INFO][03:06:34]: Average accuracy: 99.03%

[INFO][03:06:34]: Target accuracy reached.
```

#### EX 1-6 : kcenter MNIST non-IID(80/20)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.8,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.99,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "MNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 172
target accuracy : 99%
test accuracy : 99.00%

```python=
[INFO][03:18:38]: **** Round 172/10000 ****
[INFO][03:18:38]: KCenter: 90 clients, 10 centers
[INFO][03:18:38]: Training on client #44
[INFO][03:18:38]: Training on client #85
[INFO][03:18:38]: Training on client #48
[INFO][03:18:38]: Training on client #33
[INFO][03:18:38]: Training on client #69
[INFO][03:18:38]: Training on client #43
[INFO][03:18:38]: Training on client #67
[INFO][03:18:38]: Training on client #23
[INFO][03:18:38]: Training on client #36
[INFO][03:18:38]: Training on client #81
[INFO][03:18:40]: Reports recieved: 10
[INFO][03:18:40]: Aggregating updates
[INFO][03:18:40]: Saved global model: ./models/MNIST/global
[INFO][03:18:41]: Average accuracy: 99.00%

[INFO][03:18:41]: Target accuracy reached.
```

#### EX 1-7 : kcenter MNIST non-IID(50/50)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.5,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.99,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "MNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 53
target accuracy : 99%
test accuracy : 99.04%

```python=
[INFO][03:37:05]: **** Round 53/10000 ****
[INFO][03:37:05]: KCenter: 80 clients, 10 centers
[INFO][03:37:05]: Training on client #11
[INFO][03:37:05]: Training on client #58
[INFO][03:37:05]: Training on client #32
[INFO][03:37:05]: Training on client #26
[INFO][03:37:05]: Training on client #16
[INFO][03:37:05]: Training on client #70
[INFO][03:37:05]: Training on client #53
[INFO][03:37:05]: Training on client #98
[INFO][03:37:05]: Training on client #62
[INFO][03:37:05]: Training on client #46
[INFO][03:37:07]: Reports recieved: 10
[INFO][03:37:07]: Aggregating updates
[INFO][03:37:07]: Saved global model: ./models/MNIST/global
[INFO][03:37:08]: Average accuracy: 99.04%

[INFO][03:37:08]: Target accuracy reached.
```

#### EX 1-8 : kcenter MNIST non-IID(20/80)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.2,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.99,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "MNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "kcenter"
}
```

##### 實驗結果

communication round : 44
target accuracy : 99%
test accuracy : 99.00%

```python=
[INFO][03:42:18]: **** Round 44/10000 ****
[INFO][03:42:18]: KCenter: 70 clients, 10 centers
[INFO][03:42:18]: Training on client #94
[INFO][03:42:18]: Training on client #79
[INFO][03:42:18]: Training on client #24
[INFO][03:42:18]: Training on client #62
[INFO][03:42:18]: Training on client #80
[INFO][03:42:18]: Training on client #26
[INFO][03:42:18]: Training on client #57
[INFO][03:42:18]: Training on client #74
[INFO][03:42:18]: Training on client #81
[INFO][03:42:18]: Training on client #1
[INFO][03:42:20]: Reports recieved: 10
[INFO][03:42:20]: Aggregating updates
[INFO][03:42:20]: Saved global model: ./models/MNIST/global
[INFO][03:42:21]: Average accuracy: 99.00%

[INFO][03:42:21]: Target accuracy reached.
```

### Dataset : FashionMNIST

#### EX 2-1 : FedAvg FashionMNIST IID
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": true
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.85,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "FashionMNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 10000
target accuracy : 85%
test accuracy : 18.78%

```python=
[INFO][14:32:15]: **** Round 10000/10000 ****
[INFO][14:32:15]: Training on client #26
[INFO][14:32:15]: Training on client #79
[INFO][14:32:15]: Training on client #88
[INFO][14:32:15]: Training on client #34
[INFO][14:32:15]: Training on client #21
[INFO][14:32:15]: Training on client #64
[INFO][14:32:15]: Training on client #62
[INFO][14:32:15]: Training on client #92
[INFO][14:32:15]: Training on client #8
[INFO][14:32:15]: Training on client #61
[INFO][14:32:17]: Reports recieved: 10
[INFO][14:32:17]: Aggregating updates
[INFO][14:32:17]: Saved global model: ./models/FashionMNIST/global
[INFO][14:32:19]: Average accuracy: 18.78%
```

(2023/04/29 更新部分)

#### EX 2-2 : FedAvg FashionMNIST non-IID(80/20)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.8,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.85,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "FashionMNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 10000
target accuracy : 85%
test accuracy : 14.89%

```python=
[INFO][19:43:13]: **** Round 10000/10000 ****
[INFO][19:43:13]: Training on client #87
[INFO][19:43:13]: Training on client #28
[INFO][19:43:13]: Training on client #5
[INFO][19:43:13]: Training on client #62
[INFO][19:43:13]: Training on client #45
[INFO][19:43:13]: Training on client #98
[INFO][19:43:13]: Training on client #72
[INFO][19:43:13]: Training on client #37
[INFO][19:43:13]: Training on client #85
[INFO][19:43:13]: Training on client #32
[INFO][19:43:15]: Reports recieved: 10
[INFO][19:43:15]: Aggregating updates
[INFO][19:43:15]: Saved global model: ./models/FashionMNIST/global
[INFO][19:43:17]: Average accuracy: 14.89%
```

##### 調整 : 因為訓練時總是會和 target accuracy 相差 3%~5% ，所以這裡考慮先將 target accuracy 下調 5% ，看看這樣子是否就能達到 target accuracy

#### EX 2-3 : FedAvg FashionMNIST IID (target accuracy : 80%)
##### 參數設定 
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": true
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.80,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "FashionMNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 9
target accuracy : 80%
test accuracy : 80.04%

```python=
[INFO][01:40:21]: **** Round 9/10000 ****
[INFO][01:40:21]: Training on client #65
[INFO][01:40:21]: Training on client #12
[INFO][01:40:21]: Training on client #58
[INFO][01:40:21]: Training on client #73
[INFO][01:40:21]: Training on client #9
[INFO][01:40:21]: Training on client #75
[INFO][01:40:21]: Training on client #63
[INFO][01:40:21]: Training on client #97
[INFO][01:40:21]: Training on client #77
[INFO][01:40:21]: Training on client #23
[INFO][01:40:23]: Reports recieved: 10
[INFO][01:40:23]: Aggregating updates
[INFO][01:40:23]: Saved global model: ./models/FashionMNIST/global
[INFO][01:40:25]: Average accuracy: 80.04%
```

#### EX 2-4 : kcenter FashionMNIST IID (target accuracy : 80%)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": true
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.80,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "FashionMNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "kcenter"
}
```

##### 實驗結果

communication round : 4
target accuracy : 80%
test accuracy : 80.35%

```python=
[INFO][01:20:00]: **** Round 4/10000 ****
[INFO][01:20:00]: KCenter: 70 clients, 10 centers
[INFO][01:20:00]: Training on client #23
[INFO][01:20:00]: Training on client #79
[INFO][01:20:00]: Training on client #59
[INFO][01:20:00]: Training on client #71
[INFO][01:20:00]: Training on client #45
[INFO][01:20:00]: Training on client #3
[INFO][01:20:00]: Training on client #22
[INFO][01:20:00]: Training on client #14
[INFO][01:20:00]: Training on client #21
[INFO][01:20:00]: Training on client #84
[INFO][01:20:02]: Reports recieved: 10
[INFO][01:20:02]: Aggregating updates
[INFO][01:20:02]: Saved global model: ./models/FashionMNIST/global
[INFO][01:20:04]: Average accuracy: 80.35%
```

#### EX 2-5 : FedAvg FashionMNIST non-IID(80/20) (target accuracy : 80) (add FC)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.8,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.80,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "FashionMNIST",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 63
target accuracy : 80%
test accuracy : 80.44%

```python=
[INFO][14:49:31]: **** Round 63/10000 ****
[INFO][14:49:31]: Training on client #28
[INFO][14:49:31]: Training on client #57
[INFO][14:49:31]: Training on client #75
[INFO][14:49:31]: Training on client #74
[INFO][14:49:31]: Training on client #30
[INFO][14:49:31]: Training on client #10
[INFO][14:49:31]: Training on client #70
[INFO][14:49:31]: Training on client #80
[INFO][14:49:31]: Training on client #38
[INFO][14:49:31]: Training on client #37
[INFO][14:49:34]: Reports recieved: 10
[INFO][14:49:34]: Aggregating updates
[INFO][14:49:34]: Saved global model: ./models/FashionMNIST/global
[INFO][14:49:35]: Average accuracy: 80.44%
```

### Dataset : CIFAR-10

#### EX 3-1 : CIFAR-10 IID
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": true
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.55,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "CIFAR-10",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 10000
target accuracy : 55%
test accuracy : 17.53%

```python=
[INFO][22:50:37]: **** Round 10000/10000 ****
[INFO][22:50:37]: Training on client #98
[INFO][22:50:37]: Training on client #27
[INFO][22:50:37]: Training on client #69
[INFO][22:50:37]: Training on client #84
[INFO][22:50:37]: Training on client #52
[INFO][22:50:37]: Training on client #82
[INFO][22:50:37]: Training on client #50
[INFO][22:50:37]: Training on client #90
[INFO][22:50:37]: Training on client #83
[INFO][22:50:37]: Training on client #61
[INFO][22:50:39]: Reports recieved: 10
[INFO][22:50:39]: Aggregating updates
[INFO][22:50:39]: Saved global model: ./models/CIFAR-10/global
[INFO][22:50:40]: Average accuracy: 17.53%
```

##### 調整 : 因為訓練時總是會和 target accuracy 相差 2%~3% ，所以這裡考慮先將 target accuracy 下調 3% ，看看這樣子是否就能達到 target accuracy


#### EX 3-2 : CIFAR-10 IID (target accuracy : 52%)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": true
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.52,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "CIFAR-10",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "basic"
}
```

##### 實驗結果

communication round : 78
target accuracy : 52%
test accuracy : 52.16%

```python=
[INFO][00:28:46]: **** Round 78/10000 ****
[INFO][00:28:46]: Training on client #77
[INFO][00:28:46]: Training on client #99
[INFO][00:28:46]: Training on client #34
[INFO][00:28:46]: Training on client #43
[INFO][00:28:46]: Training on client #35
[INFO][00:28:46]: Training on client #91
[INFO][00:28:46]: Training on client #41
[INFO][00:28:46]: Training on client #4
[INFO][00:28:46]: Training on client #24
[INFO][00:28:46]: Training on client #39
[INFO][00:28:48]: Reports recieved: 10
[INFO][00:28:48]: Aggregating updates
[INFO][00:28:48]: Saved global model: ./models/CIFAR-10/global
[INFO][00:28:49]: Average accuracy: 52.16%
```

#### EX 3-3 : kcenter CIFAR-10 IID (target accuracy : 52%)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": true
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.52,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "CIFAR-10",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "kcenter"
}
```

##### 實驗結果

communication round : 40
target accuracy : 52%
test accuracy : 52.00%

```python=
[INFO][01:10:45]: **** Round 40/10000 ****
[INFO][01:10:45]: KCenter: 10 clients, 10 centers
[INFO][01:10:45]: Training on client #63
[INFO][01:10:45]: Training on client #18
[INFO][01:10:45]: Training on client #81
[INFO][01:10:45]: Training on client #98
[INFO][01:10:45]: Training on client #93
[INFO][01:10:45]: Training on client #5
[INFO][01:10:45]: Training on client #68
[INFO][01:10:45]: Training on client #65
[INFO][01:10:45]: Training on client #23
[INFO][01:10:45]: Training on client #88
[INFO][01:10:46]: Reports recieved: 10
[INFO][01:10:46]: Aggregating updates
[INFO][01:10:46]: Saved global model: ./models/CIFAR-10/global
[INFO][01:10:48]: Average accuracy: 52.00%
```

#### EX 3-4 : kcenter CIFAR-10 non-IID(80/20) (target accuracy : 52%)
##### 參數設定
```json
{
    "clients": {
        "total": 100,
        "per_round": 10
    },
    "data": {
        "loading": "static",
        "partition": {
            "size": 600
        },
        "IID": false,
        "bias": {
            "primary": 0.8,
            "secondary": false
        }
    },
    "federated_learning": {
        "rounds": 10000,
        "target_accuracy": 0.52,
        "task": "train",
        "epochs": 5,
        "batch_size": 10
    },
    "model": "CIFAR-10",
    "paths": {
        "data": "./data",
        "model": "./models"
    },
    "server": "kcenter"
}
```

##### 實驗結果

communication round : 10000
target accuracy : 52%
test accuracy : 10.00%

```python=
[INFO][11:39:52]: **** Round 10000/10000 ****
[INFO][11:39:52]: KCenter: 10 clients, 10 centers
[INFO][11:39:52]: Training on client #38
[INFO][11:39:52]: Training on client #24
[INFO][11:39:52]: Training on client #80
[INFO][11:39:52]: Training on client #73
[INFO][11:39:52]: Training on client #10
[INFO][11:39:52]: Training on client #29
[INFO][11:39:52]: Training on client #64
[INFO][11:39:52]: Training on client #71
[INFO][11:39:52]: Training on client #11
[INFO][11:39:52]: Training on client #15
[INFO][11:39:53]: Reports recieved: 10
[INFO][11:39:53]: Aggregating updates
[INFO][11:39:53]: Saved global model: ./models/CIFAR-10/global
[INFO][11:39:55]: Average accuracy: 10.00%
```