From 59fc19e181a084fd82ec69fdf1da852e9e72b403 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Wed, 30 Sep 2020 17:40:20 +0200 Subject: [PATCH] Added more bugs --- rgbAI/lib/func.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rgbAI/lib/func.py b/rgbAI/lib/func.py index daeecaf..5cf23ed 100644 --- a/rgbAI/lib/func.py +++ b/rgbAI/lib/func.py @@ -42,7 +42,8 @@ class AIlib: print(dCost, dProp) return dCost / dProp - def gradient( inp:np.array, obj, theta:float, maxLayer:int, layerIndex: int=0, grads: list, obj1=None, obj2=None ): # Calculate the gradient for that prop + 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