forked from DL4Jets/DeepJetCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
customObjects.py
34 lines (29 loc) · 908 Bytes
/
customObjects.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
from DeepJetCore.DJCLosses import *
from DeepJetCore.DJCLayers import *
import imp
try:
imp.find_module('Losses')
from Losses import *
except ImportError:
print ('No Losses module found, ignoring at your own risk')
global_loss_list = {}
try:
imp.find_module('Layers')
from Layers import *
except ImportError:
print ('No Layers module found, ignoring at your own risk')
global_layers_list = {}
try:
imp.find_module('Metrics')
from Metrics import *
except ImportError:
print ('No metrics module found, ignoring at your own risk')
global_metrics_list = {}
def get_custom_objects():
custom_objs = {}
custom_objs.update(djc_global_loss_list)
custom_objs.update(djc_global_layers_list)
custom_objs.update(global_loss_list)
custom_objs.update(global_layers_list)
custom_objs.update(global_metrics_list)
return custom_objs