Minor incrementation fix

master
E. Almqvist 4 years ago
parent ed0751a110
commit 2e55a8bfd8
  1. 2
      rgbAI/lib/ailib/ai.py

@ -187,7 +187,6 @@ def learn( inputNum:int, obj, theta:float, traintimes:int ):
count = 0 count = 0
while( count <= traintimes ): # targetCost is the target for the cost function while( count <= traintimes ): # targetCost is the target for the cost function
count += 1
inp = np.asarray(np.random.rand( 1, inputNum ))[0] # create a random learning sample inp = np.asarray(np.random.rand( 1, inputNum ))[0] # create a random learning sample
# inp = np.asarray([1.0, 1.0, 1.0]) # inp = np.asarray([1.0, 1.0, 1.0])
@ -201,6 +200,7 @@ def learn( inputNum:int, obj, theta:float, traintimes:int ):
mutateProps( obj, curCost, maxLen, grads ) # mutate the props for next round mutateProps( obj, curCost, maxLen, grads ) # mutate the props for next round
printProgress() printProgress()
count += 1
print("DONE\n") print("DONE\n")
print(obj.weights) print(obj.weights)

Loading…
Cancel
Save