mirror of
https://github.com/wassname/keras-contrib.git
synced 2026-06-27 16:10:11 +08:00
16 lines
354 B
Python
16 lines
354 B
Python
import numpy as np
|
|
|
|
from keras import backend as K
|
|
|
|
|
|
def get_standard_values():
|
|
'''
|
|
These are just a set of floats used for testing the activation
|
|
functions, and are useful in multiple tests.
|
|
'''
|
|
return np.array([[0, 0.1, 0.5, 0.9, 1.0]], dtype=K.floatx())
|
|
|
|
|
|
def validate_activation(activation):
|
|
activation(get_standard_values())
|