mirror of
https://github.com/wassname/keras-contrib.git
synced 2026-06-27 16:10:11 +08:00
adds tests for swish activation
This commit is contained in:
@@ -26,5 +26,17 @@ 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},
|
||||
input_shape=(2, 3, 4))
|
||||
|
||||
|
||||
@keras_test
|
||||
def test_swish_trainable():
|
||||
layer_test(advanced_activations.Swish, kwargs={'beta': 1.0, 'trainable': True},
|
||||
input_shape=(2, 3, 4))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
pytest.main([__file__])
|
||||
|
||||
Reference in New Issue
Block a user