|
|
@ -22,8 +22,8 @@ class rgb(object): |
|
|
|
|
|
|
|
|
|
|
|
def calcError( self, inp:np.array, out:np.array ): |
|
|
|
def calcError( self, inp:np.array, out:np.array ): |
|
|
|
cost = ai.calcCost( inp, out ) |
|
|
|
cost = ai.calcCost( inp, out ) |
|
|
|
print(cost) |
|
|
|
|
|
|
|
# Cost needs to get to 0, we can figure out this with backpropagation |
|
|
|
# Cost needs to get to 0, we can figure out this with backpropagation |
|
|
|
|
|
|
|
return cost |
|
|
|
|
|
|
|
|
|
|
|
def learn(): |
|
|
|
def learn(): |
|
|
|
print("learn") |
|
|
|
print("learn") |
|
|
@ -49,4 +49,6 @@ def init(): # init |
|
|
|
|
|
|
|
|
|
|
|
cost = bot.calcError(inpArr, res) |
|
|
|
cost = bot.calcError(inpArr, res) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("Cost: " + str(cost)) |
|
|
|
|
|
|
|
|
|
|
|
init() |
|
|
|
init() |
|
|
|