Skip to content

Commit 9dbe9b1

Browse files
committed
adding doctest
1 parent d676b01 commit 9dbe9b1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

neural_network/backpropagation_weight_decay.py

-6
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,13 @@ def sigmoid(input_: float) -> float:
113113
"""
114114
Sigmoid activation function
115115
Output layer
116-
117-
>>> sigmoid(4)
118-
0.9820137900379085
119116
"""
120117
return 1 / (1 + np.exp(-input_))
121118

122119

123120
def d_sigmoid(input_: float) -> float:
124121
"""
125122
Sigmoid activation derivate
126-
127-
>>> d_sigmoid(4)
128-
0.017662706213291114
129123
"""
130124
return sigmoid(input_) ** 2 * np.exp(-input_)
131125

0 commit comments

Comments
 (0)