mirror of
https://github.com/wassname/keras-contrib.git
synced 2026-06-27 16:10:11 +08:00
692e8a5aef
* add srelu activation * update srelu style * make srelu and pelu work with any initializer * add missing config line * make initializations better match paper
31 lines
718 B
Python
31 lines
718 B
Python
import pytest
|
|
from keras.utils.test_utils import layer_test, keras_test
|
|
from keras_contrib.layers import advanced_activations
|
|
|
|
|
|
@keras_test
|
|
def test_pelu():
|
|
layer_test(advanced_activations.PELU, kwargs={},
|
|
input_shape=(2, 3, 4))
|
|
|
|
|
|
@keras_test
|
|
def test_pelu_share():
|
|
layer_test(advanced_activations.PELU, kwargs={'shared_axes': 1},
|
|
input_shape=(2, 3, 4))
|
|
|
|
|
|
@keras_test
|
|
def test_srelu():
|
|
layer_test(advanced_activations.SReLU, kwargs={},
|
|
input_shape=(2, 3, 4))
|
|
|
|
|
|
@keras_test
|
|
def test_srelu_share():
|
|
layer_test(advanced_activations.SReLU, kwargs={'shared_axes': 1},
|
|
input_shape=(2, 3, 4))
|
|
|
|
if __name__ == '__main__':
|
|
pytest.main([__file__])
|