File size: 839 Bytes
9d25b7a
 
 
 
 
 
 
 
 
 
 
 
 
 
a783ca8
9d25b7a
a783ca8
9d25b7a
 
a783ca8
9d25b7a
 
 
a783ca8
9d25b7a
 
 
 
 
 
a783ca8
9d25b7a
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Federated Learning Docker

## Building the container
```
docker build -t <dockerhub-username>/federated .
```
## Running the container
```
docker run -it --gpus all <dockerhub-username>/federated /bin/bash
```

## Testing the scripts
### Train
```
python train.py --dataset_path brain-tumor-train.csv --model_save_path model.h5
```

### Generate Gradients
```
python gen_gradients.py  --image_dir  /brain_tumor_classifier_dataset --gradients_save_path /gradients --model_path model.h5
```
### Update Model
```
python update_model.py --model_path model.h5 --saved_gradients gradients --dataset_path brain-tumor-train.csv
```

### Inference
```
python inference.py --model_path model.h5 --image_dir brain_tumor_classifier_dataset --output_json outputs.json
```

### Pushing the container
```
docker push <dockerhub-username>/federated
```