又搞到3点,还是没有找到问题在哪,不过已经排除了是forward的问题
This commit is contained in:
17
algorithms/neat/genome/origin_neat/activations.py
Normal file
17
algorithms/neat/genome/origin_neat/activations.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Has the built-in activation functions,
|
||||
code for using them,
|
||||
and code for adding new user-defined ones
|
||||
"""
|
||||
import math
|
||||
|
||||
def sigmoid_activation(z):
|
||||
z = max(-60.0, min(60.0, 5.0 * z))
|
||||
return 1.0 / (1.0 + math.exp(-z))
|
||||
|
||||
|
||||
activation_dict = {
|
||||
"sigmoid": sigmoid_activation,
|
||||
}
|
||||
|
||||
full_activation_list = list(activation_dict.keys())
|
||||
Reference in New Issue
Block a user