From 1493824ac7fac2bbefe5eab88b71f62568ba1d54 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Wed, 30 Sep 2020 17:56:47 +0200 Subject: [PATCH] Removed small bugs --- rgbAI/lib/func.py | 6 +++--- rgbAI/main.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rgbAI/lib/func.py b/rgbAI/lib/func.py index 5cf23ed..210f904 100644 --- a/rgbAI/lib/func.py +++ b/rgbAI/lib/func.py @@ -38,14 +38,14 @@ class AIlib: def propDer( dCost, dProp ): # Calculate the partial derivative for that prop - print("################") - print(dCost, dProp) + #print("################") + #print(dCost, dProp) return dCost / dProp def gradient( inp:np.array, obj, theta:float, maxLayer:int, layerIndex: int=0, grads=None, obj1=None, obj2=None ): # Calculate the gradient for that prop # Check if grads exists, if not create the buffer if( not grads ): - grads = [None] * maxLayer + grads = [None] * (maxLayer+1) # Create new instances of the object if( not obj1 or not obj2 ): diff --git a/rgbAI/main.py b/rgbAI/main.py index d02231a..1adc53a 100755 --- a/rgbAI/main.py +++ b/rgbAI/main.py @@ -55,7 +55,7 @@ class rgb(object): def init(): bot = rgb() - bot.traintimes = 100 + bot.traintimes = 1 bot.train()