Invalid results when saving and loading balance / model in Keras
I cannot post the code I am using, but I will try to explain it. I first defined a few functions to preprocess the raw data. Then using keras I have the following architecture:
model = Sequential()
model.add(Dense(10, input_dim=230, init='uniform',activation='sigmoid'))
model.add(Dense(5, init='uniform', activation='sigmoid'))
model.add(Dense(2, init='uniform', activation='sigmoid'))
model.compile(loss='mse', optimizer='RMSprop', metrics=['binary_accuracy'])
model.fit(trainX, trainY, nb_epoch=1000, batch_size=1, callbacks=[history], verbose=2)
Now about the problem. When I run the code I get> 98% precision, but when I save the weight / model (following the keras doc) and then load them I get garbage results.
I tried loading after and before the compile line, saving / loading weights / model, nothing works (I keep getting wrong results after loading them in another python session)
+3
source to share