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

convert keras to TF issues #97

Open
onexuan opened this issue Oct 24, 2019 · 0 comments
Open

convert keras to TF issues #97

onexuan opened this issue Oct 24, 2019 · 0 comments

Comments

@onexuan
Copy link

onexuan commented Oct 24, 2019

convert keras to TF issues
https://github.com/idealo/image-quality-assessment/tree/master/models/MobileNet

Using TensorFlow backend.
E1024 13:13:24.766817 4580332992 keras_to_tensorflow.py:79] Couldn't load model from json.
Traceback (most recent call last):
File "keras_to_tensorflow.py", line 63, in load_model
model = keras.models.load_model(input_model_path)
File "/usr/local/lib/python3.7/site-packages/keras/engine/saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/keras/engine/saving.py", line 584, in load_model
model = _deserialize_model(h5dict, custom_objects, compile)
File "/usr/local/lib/python3.7/site-packages/keras/engine/saving.py", line 270, in _deserialize_model
model_config = h5dict['model_config']
File "/usr/local/lib/python3.7/site-packages/keras/utils/io_utils.py", line 318, in getitem
raise ValueError('Cannot create group in read-only mode.')
ValueError: Cannot create group in read-only mode.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "keras_to_tensorflow.py", line 182, in
app.run(main)
File "/usr/local/lib/python3.7/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "keras_to_tensorflow.py", line 128, in main
model = load_model(FLAGS.input_model, FLAGS.input_model_json, FLAGS.input_model_yaml)
File "keras_to_tensorflow.py", line 80, in load_model
raise err
File "keras_to_tensorflow.py", line 75, in load_model
model = model_from_json(open(str(input_json_path)).read())
File "/usr/local/lib/python3.7/site-packages/keras/engine/saving.py", line 664, in model_from_json
return deserialize(config, custom_objects=custom_objects)
File "/usr/local/lib/python3.7/site-packages/keras/layers/init.py", line 168, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 129, in deserialize_keras_object
raise ValueError('Improper config format: ' + str(config))
ValueError: Improper config format: {'train_env': 'remote', 's3_bucket': 'ds-hotel-image-assessment', 'docker_image': 'idealo/nima-gpu', 'base_model_name': 'MobileNet', 'existing_weights': None, 'n_classes': 10, 'batch_size': 96, 'epochs_train_dense': 5, 'learning_rate_dense': 0.001, 'decay_dense': 0, 'epochs_train_all': 9, 'learning_rate_all': 3e-05, 'decay_all': 2.3e-05, 'l2_reg': None, 'dropout_rate': 0.75, 'multiprocessing_data_load': True, 'num_workers_data_load': 8}

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

1 participant