From 2f1d7d458db7ac708c583ecf6f414a5308711783 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sat, 17 Oct 2020 17:50:01 +0200 Subject: [PATCH] Tweaked the cost function --- rgbAI/lib/func.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rgbAI/lib/func.py b/rgbAI/lib/func.py index 41942f4..b279cb7 100644 --- a/rgbAI/lib/func.py +++ b/rgbAI/lib/func.py @@ -13,7 +13,7 @@ class AIlib: maxLen = len(correct) for i in range(maxLen): - costSum += (predicted[i] - correct[i])**2 + costSum += abs((predicted[i] - correct[i])) return costSum / maxLen