mirror of
https://github.com/wassname/keras-contrib.git
synced 2026-09-10 12:14:52 +08:00
make srelu and pelu work with any initializer
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user