-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvisualisation.py
More file actions
58 lines (52 loc) · 2.11 KB
/
visualisation.py
File metadata and controls
58 lines (52 loc) · 2.11 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
'''
This file contains the calls to the visualisations
Misha Mesarcik 2020
'''
import visualisations
from config import config
import traceback
def get_visualsation(autoencoder,data,original_data,labels,wandb):
"""
This returns the models defined in architecture as specified in config
"""
assert (('vae' in config['architecture']) or
(config['architecture'] == 'ae') or
('skip' in config['architecture']) or
(config['architecture'] == 'ae_tsne')), 'Architecture must be ae or vae'
try:
wandb.log({'spectrogram_analysis':visualisations.plot_spectrograms(original_data,
config)})
except Exception as e:
traceback.print_exc()
pass
try:
wandb.log({'IO_analysis':visualisations.plot_io(autoencoder,
data)})
except Exception as e :
traceback.print_exc()
pass
if 'vae' in config['architecture'] or 'skip' in config['architecture']:
try:
wandb.log({'vae_embedding':visualisations.plot_embedding(autoencoder,
config)})
except Exception as e:
traceback.print_exc()
pass
try:
wandb.log({'vae_overlay':(visualisations.plot_scatter(autoencoder,data))})
except Exception as e:
traceback.print_exc()
pass
try:
wandb.log({'vae_scatter':wandb.Image(visualisations.plot_labeled_scatter(autoencoder,
data,
labels))})
except Exception as e:
traceback.print_exc()
pass
try:
wandb.log({'vae_hist':wandb.Image(visualisations.plot_hist(autoencoder,
data))})
except Exception as e:
traceback.print_exc()
pass