-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load re-trained model error #4
Comments
Please provide details how you loaded the h5 file. |
|
I'm afraid I cannot reproduce your problem i.e. the commands you provided work as expected in my environment. What versions of Keras and Tensorflow do you use? |
Probably you ran into keras-team/keras#11281 |
tensorflow==1.9.0 |
You will need to re-train the model as the h5 files have been written with the older Keras version. For a quick test, can you please train the model again for only 1 epoch and then use the generated h5 file with the demo? This should work now. I'm using Keras 2.2.4 and tested with Tensorflow 1.10 and 1.12. |
thanks a lot! |
You're welcome, glad it worked! |
this helped me too. consider adding keras=2.2.4 as a requirement. |
Sorry but it doesn't work for me to update keras to 2.2.4. |
at the beginning, 'demo.py' ran successfully with pretrained model.
then, after preparing and converting data, I retrained the model by
python train.py --dataset ./DIV2K_BIN --outdir ./output --profile wdsr-a-8 --scale 2
it ran normally for 300 epochs, and I got many new h5 files. when I loaded one of new h5 files, error occurred:
TypeError: Expected float32, got {'type': 'ndarray', 'value': [114.44399999999999, 111.4605, 103.02000000000001]} of type 'dict' instead.
could you offer me some suggestions?
The text was updated successfully, but these errors were encountered: