sistemato graficamente i codici, messo le funzioni stampa in un altro file, così sembra più pulito e si ci può ragionare meglio
This commit is contained in:
25
stampe_video.py
Normal file
25
stampe_video.py
Normal file
@@ -0,0 +1,25 @@
|
||||
def disegna_funzione(p, y, x1, x2, isFinal, errore = 0):
|
||||
if isFinal == False:
|
||||
print(f"\tW1: {p.w1}")
|
||||
print(f"X1: {x1} --------> ")
|
||||
print(f"\t\t( bias: {p.bias} ) -------> Y: {y}")
|
||||
print(f"X2: {x2} --------> ")
|
||||
print(f"\tW2: {p.w2}")
|
||||
else:
|
||||
print(f"\t\t\t\t\t\tW1: {p.w1}")
|
||||
print(f"\t\t\t\t\tX1: {x1} --------> ")
|
||||
print(f"\t\t\t\t\t\t\t( bias: {p.bias} ) -------> Y: {y} ----> errore: {errore}")
|
||||
print(f"\t\t\t\t\tX2: {x2} --------> ")
|
||||
print(f"\t\t\t\t\t\tW2: {p.w2}")
|
||||
|
||||
def stampa_risultati_single_layer(p):
|
||||
print("Percettrone:")
|
||||
print(f"\t W1: {p.w1}, W2: {p.w2}, bias: {p.bias}")
|
||||
|
||||
def stampa_risultati_multilayer(pin_est_1, pin_est_2, pinout):
|
||||
print("Percettrone 1:")
|
||||
print(f"\t W1: {pin_est_1.w1}, W2: {pin_est_1.w2}, bias: {pin_est_1.bias}")
|
||||
print("Percettrone 2:")
|
||||
print(f"\t W1: {pin_est_2.w1}, W2: {pin_est_2.w2}, bias: {pin_est_2.bias}")
|
||||
print("Percettrone OUT:")
|
||||
print(f"\t W1: {pinout.w1}, W2: {pinout.w2}, bias: {pinout.bias}")
|
||||
Reference in New Issue
Block a user