-
Notifications
You must be signed in to change notification settings - Fork 1
/
FedVizu.py
39 lines (30 loc) · 1.21 KB
/
FedVizu.py
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
37
38
39
"""
FedVizu.py
Run Vizualization after an epoch/ training has finished
"""
import logging
from monai.ILIA.core.FedVizu import FedVizu
class FedDisVizu(FedVizu):
"""
Federated Vizualization
- run vizualization on epoch_end and on training_end, e.g. UMAP plot, heat-maps, gradients, etc..
"""
def on_epoch_end(self, global_models, loss_locals):
"""
:param global_models: dict
dictionary with the model weights of the federated collaborators
:param loss_locals:
the loss values of the epoch for all federated collaborators
The function does not return anything. Use std output or files for printing and plotting statistics
"""
logging.info('[FedVizu::on_epoch_end]: Not implemented yet.')
return
def on_train_end(self, global_models):
"""
Function to perform analysis after training is complete, e.g., call downstream tasks routines, e.g.
anomaly detection, classification, etc..
:param global_models: dict
dictionary with the model weights of the federated collaborators
"""
logging.info('[FedVizu::on_train_end]: Not implemented yet.')
return