micmon icon indicating copy to clipboard operation
micmon copied to clipboard

Error

Open TheRo0T opened this issue 4 years ago • 3 comments

Hey! Great library! Please tell me what could be the problem. When I run the train.py, I get an error:

Traceback (most recent call last): File "train.py", line 50, in <module> model.save(model_dir, overwrite=True) File "/home/pi/venv/lib/python3.7/site-packages/micmon-0.1-py3.7.egg/micmon/model/__init__.py", line 58, in save File "/home/pi/venv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py", line 986, in save signatures, options) File "/home/pi/venv/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/save.py", line 112, in save_model model, filepath, overwrite, include_optimizer) File "/home/pi/venv/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/hdf5_format.py", line 73, in save_model_to_hdf5 raise ImportError('save_modelrequires h5py.') ImportError:save_modelrequires h5py.

I am using Raspbian GNU/Linux 10 (buster) h5py package installed, Version: 3.1.0

TheRo0T avatar Jan 29 '21 05:01 TheRo0T

As stated by the error, recent versions of TensorFlow require h5py to export a model to .h5 format.

blacklight avatar Feb 01 '21 01:02 blacklight

Thanks for the answer! Probably this library does not work in older versions of Tensorflow, I am using 1.14.

TheRo0T avatar Feb 01 '21 10:02 TheRo0T

You have to use Tensorflow 2.0 or higher. There have been simply too many changes in the API from 1.x to 2.x to be able to maintain back-compatibility.

blacklight avatar Feb 01 '21 11:02 blacklight