Fixed small bug

pull/1/head
E. Almqvist 4 years ago
parent 9c28fcdfcf
commit bff87e11a4
  1. 2
      rgbAI/lib/func.py
  2. 2
      rgbAI/main.py

@ -87,7 +87,7 @@ class AIlib:
obj.weights[i] -= obj.learningrate * gradient[i]["weight"] # mutate the weights
obj.bias[i] -= obj.learningrate * gradient[i]["bias"]
def learn( inputNum:int, targetCost:float, obj, curCost: float=None ):
def learn( inputNum:int, targetCost:float, obj, theta:float, curCost: float=None ):
# Calculate the derivative for:
# Cost in respect to weights
# Cost in respect to biases

@ -29,7 +29,7 @@ class rgb(object):
return cost
def learn( self ):
ai.learn( 3, 0.001, self, 0.0001 )
ai.learn( 3, 0.001, self, 0.001 )
def think( self, inp:np.array ):
print("-----Gen " + str(self.generation) + "------")

Loading…
Cancel
Save