@@ -447,7 +447,7 @@ def predict(example):
447
447
for layer in learned_net [1 :]:
448
448
for node in layer :
449
449
inc = [n .value for n in node .inputs ]
450
- in_val = dotproduct (inc , node .weights )
450
+ in_val = sum_dotproduct (inc , node .weights )
451
451
node .value = node .activation (in_val )
452
452
453
453
# Hypothesis
@@ -530,7 +530,7 @@ def BackPropagationLearner(dataset, net, learning_rate, epoches):
530
530
for layer in net [1 :]:
531
531
for node in layer :
532
532
inc = [n .value for n in node .inputs ]
533
- in_val = dotproduct (inc , node .weights )
533
+ in_val = sum_dotproduct (inc , node .weights )
534
534
node .value = node .activation (in_val )
535
535
536
536
# Initialize delta
@@ -554,7 +554,7 @@ def BackPropagationLearner(dataset, net, learning_rate, epoches):
554
554
for k in range (h_units )]
555
555
556
556
delta [i ] = [(layer [j ].value ) * (1 - layer [j ].value ) *
557
- dotproduct (w [j ], delta [i + 1 ])
557
+ sum_dotproduct (w [j ], delta [i + 1 ])
558
558
for j in range (h_units )]
559
559
560
560
# Update weights
@@ -591,7 +591,7 @@ def predict(example):
591
591
for layer in learned_net [1 :]:
592
592
for node in layer :
593
593
inc = [n .value for n in node .inputs ]
594
- in_val = dotproduct (inc , node .weights )
594
+ in_val = sum_dotproduct (inc , node .weights )
595
595
node .value = node .activation (in_val )
596
596
597
597
# Hypothesis
0 commit comments