Files
keras-contrib/tests/keras_contrib/layers/test_advanced_activations.py
Michael Oliver 692e8a5aef Add SReLU activation function (#77)
* add srelu activation

* update srelu style

* make srelu and pelu work with any initializer

* add missing config line

* make initializations better match paper
2017-04-24 13:26:27 -07:00

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__])