Why is the accuracy for my Keras model always 0 when training?

后端 未结 4 887
粉色の甜心
粉色の甜心 2020-12-23 09:36

I\'m pretty new to keras I have built a simple network to try:

import numpy as np;

from keras.models import Sequential;
from keras.layers import Dense,Activ         


        
4条回答
  •  执笔经年
    2020-12-23 10:07

    Add following to get metrics:

       history = model.compile(optimizer='adam', loss='mean_squared_error', metrics=['mean_squared_error'])
       # OR
       history = model.compile(optimizer='adam', loss='mean_absolute_error', metrics=['mean_absolute_error'])
       history.history.keys()
       history.history
    

提交回复
热议问题