我希望用numpy计算损失。所以作为首发,我尝试下面的代码,我认为它不应该改变任何。然而,损失负增长。有谁知道为什么?
def mySSE2(y_true, y_pred):
try:
print '1+++++++++++++'
e = y_true - y_pred
mse = K.mean(K.square(e)) # this just mse
mse = K.variable(K.eval(mse))) # this is my test
result3 = mse
except:
print '================'
return e
return result3