-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Faced many challenges related to the tf and keras compatible version. After a lot of hassles, I was able to resolve the dependencies of libraries needed. Now, I am stuck at the below issue where it is asking for some marshal code. I believe this is coming from the custom objects passed into the model_from_json api call in eval.py line 140.
Please advise or let me know if there is any updated stable version of the codebase.
Using TensorFlow backend.
find: -xtype: unknown primary or operator
make: `adaptor.so' is up to date.
WARNING:tensorflow:From /Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:349: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
WARNING:tensorflow:From /Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:3147: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.
WARNING:tensorflow:From /Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:99: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.
WARNING:tensorflow:From /Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:3014: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
Traceback (most recent call last):
File "eval.py", line 194, in
main()
File "eval.py", line 140, in main
model = model_from_json(loaded_model_json)#, custom_objects={'tf': tf})#, 'RESIZE_FACTOR': RESIZE_FACTOR})
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/models.py", line 325, in model_from_json
return layer_module.deserialize(config, custom_objects=custom_objects)
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/layers/init.py", line 46, in deserialize
printable_module_name='layer')
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 140, in deserialize_keras_object
list(custom_objects.items())))
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/engine/topology.py", line 2361, in from_config
process_layer(layer_data)
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/engine/topology.py", line 2330, in process_layer
custom_objects=custom_objects)
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/layers/init.py", line 46, in deserialize
printable_module_name='layer')
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 140, in deserialize_keras_object
list(custom_objects.items())))
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/layers/core.py", line 706, in from_config
function = func_load(config['function'], globs=globs)
File "/Users/ganjha/opt/anaconda3/envs/eastv1/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 200, in func_load
code = marshal.loads(code.encode('raw_unicode_escape'))
ValueError: bad marshal data (unknown type code)