mirror of
https://github.com/wassname/keras-contrib.git
synced 2026-06-27 16:10:11 +08:00
add lines for pep8
This commit is contained in:
@@ -235,6 +235,9 @@ class SReLU(Layer):
|
||||
base_config = super(SReLU, self).get_config()
|
||||
return dict(list(base_config.items()) + list(config.items()))
|
||||
|
||||
get_custom_objects().update({'SReLU': SReLU})
|
||||
|
||||
|
||||
class Swish(Layer):
|
||||
""" Swish (Ramachandranet al., 2017)
|
||||
|
||||
@@ -279,4 +282,4 @@ class Swish(Layer):
|
||||
base_config = super(Swish, self).get_config()
|
||||
return dict(list(base_config.items()) + list(config.items()))
|
||||
|
||||
get_custom_objects().update({'SReLU': SReLU, 'Swish': Swish})
|
||||
get_custom_objects().update({'Swish': Swish})
|
||||
|
||||
@@ -26,6 +26,7 @@ def test_srelu_share():
|
||||
layer_test(advanced_activations.SReLU, kwargs={'shared_axes': 1},
|
||||
input_shape=(2, 3, 4))
|
||||
|
||||
|
||||
@keras_test
|
||||
def test_swish_constant():
|
||||
layer_test(advanced_activations.Swish, kwargs={'beta': 1.0, 'trainable': False},
|
||||
|
||||
Reference in New Issue
Block a user