pull/1/head
E. Almqvist 4 years ago
parent 80013cab71
commit 86727591df
  1. 2
      rgbAI/lib/func.py

@ -54,7 +54,7 @@ class AIlib:
def gradient( dCost:float, prop:list ): def gradient( dCost:float, prop:list ):
propLen = len(prop) propLen = len(prop)
gradient = [None] * propLen gradient = [None] * propLen
for i in range( propLen, 0, -1 ): for i in range( propLen, -1, -1 ):
if( i == propLen ): if( i == propLen ):
gradient[i] = dCost / prop[i] gradient[i] = dCost / prop[i]
else: else:

Loading…
Cancel
Save