myawesomepkg 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/PKG-INFO +1 -1
- myawesomepkg-0.1.2/myawesomepkg/d.py +36 -0
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/myawesomepkg.egg-info/PKG-INFO +1 -1
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/myawesomepkg.egg-info/SOURCES.txt +1 -0
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/setup.py +1 -1
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/myawesomepkg/__init__.py +0 -0
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/myawesomepkg/core.py +0 -0
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/myawesomepkg.egg-info/dependency_links.txt +0 -0
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/myawesomepkg.egg-info/top_level.txt +0 -0
- {myawesomepkg-0.1.0 → myawesomepkg-0.1.2}/setup.cfg +0 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
import math
|
2
|
+
n=int(input("Enter no of input neurons:"))
|
3
|
+
|
4
|
+
print("enter input")
|
5
|
+
inputs=[]
|
6
|
+
|
7
|
+
for i in range(0,n):
|
8
|
+
x=float(input())
|
9
|
+
inputs.append(x)
|
10
|
+
print(inputs)
|
11
|
+
|
12
|
+
print("enter weight")
|
13
|
+
weights=[]
|
14
|
+
|
15
|
+
for i in range(0,n):
|
16
|
+
w=float(input())
|
17
|
+
weights.append(w)
|
18
|
+
print(weights)
|
19
|
+
|
20
|
+
print(" the net input is calculated as Yin=x1w1+x2w2+x3w3")
|
21
|
+
|
22
|
+
Yin=[]
|
23
|
+
for i in range(0,n):
|
24
|
+
Yin.append(inputs[i]*weights[i])
|
25
|
+
ynet=round(sum(Yin),3)
|
26
|
+
|
27
|
+
print("net input for y neuron",ynet)
|
28
|
+
|
29
|
+
print("apply activation function over net input, Binary function")
|
30
|
+
|
31
|
+
y=round(1/(1+math.exp(-ynet)),3)
|
32
|
+
print(y)
|
33
|
+
|
34
|
+
print("apply activation function over net input, Bipolar function")
|
35
|
+
y=round((2/(1+math.exp(-ynet)))-1,3)
|
36
|
+
print(y)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|