pull/1/head
E. Almqvist 4 years ago
parent 9cb11da281
commit d5a181ba39
  1. 5
      rgbAI/lib/func.py

@ -42,7 +42,10 @@ 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: list, obj1=None, obj2=None ): # Calculate the gradient for that prop
if( not grads ):
grads = [None] * maxLayer
# Create new instances of the object
if( not obj1 or not obj2 ):
obj1 = obj

Loading…
Cancel
Save