From bff87e11a4b8d524fb62452d46f6c9e03f87953f Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Wed, 30 Sep 2020 18:48:11 +0200 Subject: [PATCH] Fixed small bug --- rgbAI/lib/func.py | 2 +- rgbAI/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rgbAI/lib/func.py b/rgbAI/lib/func.py index 0ffbfc0..575b0c8 100644 --- a/rgbAI/lib/func.py +++ b/rgbAI/lib/func.py @@ -87,7 +87,7 @@ class AIlib: obj.weights[i] -= obj.learningrate * gradient[i]["weight"] # mutate the weights obj.bias[i] -= obj.learningrate * gradient[i]["bias"] - def learn( inputNum:int, targetCost:float, obj, curCost: float=None ): + def learn( inputNum:int, targetCost:float, obj, theta:float, curCost: float=None ): # Calculate the derivative for: # Cost in respect to weights # Cost in respect to biases diff --git a/rgbAI/main.py b/rgbAI/main.py index f58bc28..3573591 100755 --- a/rgbAI/main.py +++ b/rgbAI/main.py @@ -29,7 +29,7 @@ class rgb(object): return cost def learn( self ): - ai.learn( 3, 0.001, self, 0.0001 ) + ai.learn( 3, 0.001, self, 0.001 ) def think( self, inp:np.array ): print("-----Gen " + str(self.generation) + "------")