Upload hologramm_195_195!.py
Browse files- hologramm_195_195!.py +44 -0
hologramm_195_195!.py
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# -*- coding: utf-8 -*-
|
2 |
+
"""hologramm.195.195!
|
3 |
+
|
4 |
+
Automatically generated by Colab.
|
5 |
+
|
6 |
+
Original file is located at
|
7 |
+
https://colab.research.google.com/drive/1UwiDcE0dY0IvrEYXjw2drfZJc78qCDKA
|
8 |
+
"""
|
9 |
+
|
10 |
+
import math
|
11 |
+
|
12 |
+
def sigmoid(x):
|
13 |
+
return 1 / (1 + math.exp(-x))
|
14 |
+
|
15 |
+
sigmoid(100)
|
16 |
+
|
17 |
+
sigmoid(1)
|
18 |
+
|
19 |
+
sigmoid(-56)
|
20 |
+
|
21 |
+
sigmoid(0.5)
|
22 |
+
|
23 |
+
def tanh(x):
|
24 |
+
return (math.exp(x) - math.exp(-x)) / (math.exp(x) + math.exp(-x))
|
25 |
+
|
26 |
+
tanh(-56)
|
27 |
+
|
28 |
+
tanh(50)
|
29 |
+
|
30 |
+
tanh(1)
|
31 |
+
|
32 |
+
def relu(x):
|
33 |
+
return max(0,x)
|
34 |
+
|
35 |
+
relu(-100)
|
36 |
+
|
37 |
+
relu(8)
|
38 |
+
|
39 |
+
def leaky_relu(x):
|
40 |
+
return max(0.1*x,x)
|
41 |
+
|
42 |
+
leaky_relu(-100)
|
43 |
+
|
44 |
+
leaky_relu(8)
|