Skip to content
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

ValueError: Unknown initializer: f #99

Open
zyyhl opened this issue Nov 11, 2019 · 1 comment
Open

ValueError: Unknown initializer: f #99

zyyhl opened this issue Nov 11, 2019 · 1 comment

Comments

@zyyhl
Copy link

zyyhl commented Nov 11, 2019

E1111 14:35:28.563664 140541594945280 keras_to_tensorflow.py:85] Input file specified only holds the weights, and not the model definition. Save the model using model.save(filename.h5) which will contain the network architecture as well as its weights. If the model is saved using model.save_weights(filename), the flag input_model_json should also be set to the architecture which is exported separately in a json format. Check the keras documentation for more details (https://keras.io/getting-started/faq/)
Traceback (most recent call last):
File "keras_to_tensorflow.py", line 172, in
app.run(main)
File "/scratch/workspace/anaconda2/lib/python2.7/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/scratch/workspace/anaconda2/lib/python2.7/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "keras_to_tensorflow.py", line 118, in main
model = load_models(FLAGS.input_model, FLAGS.input_model_json)
File "keras_to_tensorflow.py", line 94, in load_models
raise wrong_file_err
ValueError: Unknown initializer: f

My .h5 file contains the model structure and weights. Can you help me see what is wrong?

@cydawn
Copy link

cydawn commented Nov 9, 2020

I just meet this problem. Do you fix it? @zyyhl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants