Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
frmatias committed Aug 28, 2017
1 parent 4481f28 commit 1bc3a17
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Neural_Network/perceptron.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def trannig(self):
epoch_count = epoch_count + 1
# if you want controle the epoch or just by erro
if erro == False:
print('\nEpoch:\n',epoch_count)
print('------------------------\n')
#if epoch_count > self.epoch_number or not erro:
break

Expand Down Expand Up @@ -105,6 +107,7 @@ def sign(self, u):
[2.4482, 0.9455, 11.2095],
[2.0149, 0.6192, 10.9263],
[0.2012, 0.2611, 5.4631]

]

exit = [-1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1]
Expand All @@ -114,12 +117,7 @@ def sign(self, u):
network.trannig()

while True:
i = 0
sample = []
while i < 3:
value = input('value: ')
value = float(value)
sample.insert(i, value)
i = i + 1

for i in range(3):
sample.insert(i, float(input('value: ')))
network.sort(sample)

0 comments on commit 1bc3a17

Please sign in to comment.