We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2b1b89 commit fcc13b1Copy full SHA for fcc13b1
Deep_learning/Sigmoid.py
@@ -0,0 +1,25 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+Created on Sat Aug 11 16:13:45 2018
4
+
5
+@author: Administrator
6
7
8
+# GRADED FUNCTION: sigmoid
9
10
+def sigmoid(z):
11
+ """
12
+ Compute the sigmoid of z
13
14
+ Arguments:
15
+ z -- A scalar or numpy array of any size.
16
17
+ Return:
18
+ s -- sigmoid(z)
19
20
21
+ ### START CODE HERE ### (≈ 1 line of code)
22
+ s = 1 / (1 + np.exp(-(z)))
23
+ ### END CODE HERE ###
24
25
+ return s
0 commit comments