Previously I used keras==0.1.3, and trained lots of models (LSTM model with 
files format '.h5' in my case). Let's say they are 'OM' (old models) 
trained from 'OK' (old keras). Every time, I generated the model structure, 
and used 'model.load_weights' to load the weights. All work perfectly.

Now I upgrade to keras==1.x.x (eg.1.2.1), and try to use the new version of 
keras to do the same as before. I generate the same NN (changed codes a 
little), and run the same LSTM sequence prediction codes as before. 
 'model.load_weights' can be run smoothly, however, all predictions are 
totally wrong. 

Then I use the keras==1.x.x to train new model and save its weights. Let's 
say they are 'NM' (new model) trained from 'NK' (new keras)

So far, what I found is

'OK' can load 'OM', the prediction/output is correct 

'OK' cannot load the 'NM' weights, the error is: KeyError: "Can't open 
attribute (Can't locate attribute: 'nb_layers')"

'NK' can load the 'OM' weights, however, its prediction/output is totally 
wrong 

Because I have trained lots of models using 'OK', I really hope the models 
are not useless. But if I stick to the 'OK', some of functions or methods 
of 'NK' are not available, in addition all menus are written for 'NK'.

Is there any one know what happened here?

Thanks




-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to