Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Error on prediction #18

Open
sajanbhagat opened this issue Nov 27, 2019 · 3 comments
Open

Error on prediction #18

sajanbhagat opened this issue Nov 27, 2019 · 3 comments

Comments

@sajanbhagat
Copy link

sajanbhagat commented Nov 27, 2019

I'm getting following error on training and predict call from terminal

Python 3.6.8

Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/bidaf/main.py", line 122, in
main()
File "/usr/local/lib/python3.6/dist-packages/bidaf/main.py", line 85, in main
bidaf_model.load_bidaf(os.path.join(os.path.dirname(file), 'saved_items', args.model_name))
File "/usr/local/lib/python3.6/dist-packages/bidaf/models/bidaf.py", line 87, in load_bidaf
self.model = load_model(path, custom_objects=custom_objects)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/saving.py", line 584, in load_model
model = _deserialize_model(h5dict, custom_objects, compile)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/saving.py", line 333, in _deserialize_model
str(len(weight_values)) +
TypeError: must be str, not bytes

@pg815
Copy link

pg815 commented Dec 26, 2019

Have you found any solution for this issue ?

@sajanbhagat
Copy link
Author

No, i haven't found any solution yet

@ParikhKadam
Copy link
Owner

That's an environment error. Install tensorflow and keras versions mentioned in the requirements.txt file and this issue will be solved.

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

No branches or pull requests

3 participants