又搞到3点,还是没有找到问题在哪,不过已经排除了是forward的问题

This commit is contained in:
wls2002
2023-05-07 02:59:48 +08:00
parent 414b620dc8
commit d1f54022bd
16 changed files with 772 additions and 58 deletions

View 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())