make srelu and pelu work with any initializer

This commit is contained in:
Michael Oliver
2017-04-21 16:47:59 -07:00
parent 278c008440
commit 1b11a5d3dd
@@ -66,6 +66,7 @@ class PELU(Layer):
param_shape[i - 1] = 1
self.param_broadcast[i - 1] = True
param_shape = tuple(param_shape)
# Initialised as ones to emulate the default ELU
self.alpha = self.add_weight(param_shape,
name='alpha',
@@ -175,6 +176,8 @@ class SReLU(Layer):
param_shape[i - 1] = 1
self.param_broadcast[i - 1] = True
param_shape = tuple(param_shape)
self.t_left = self.add_weight(param_shape,
name='t_left',
initializer=self.t_left_initializer)