|
|
|
@ -1565,6 +1565,10 @@ class LayerBase(object):
|
|
|
|
|
|
|
|
|
|
self.config = g_config.model_config.layers.add()
|
|
|
|
|
assert isinstance(self.config, LayerConfig)
|
|
|
|
|
use_mkldnn = bool(int(g_command_config_args.get("use_mkldnn", 0)))
|
|
|
|
|
mkldnn_acts = ['relu', 'tanh']
|
|
|
|
|
if use_mkldnn and active_type in mkldnn_acts:
|
|
|
|
|
active_type = "mkldnn_" + active_type
|
|
|
|
|
self.config.name = name
|
|
|
|
|
self.config.type = type
|
|
|
|
|
self.config.active_type = active_type
|
|
|
|
|