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

You may want to update the documentation #22

Open
Shamino0 opened this issue Feb 3, 2021 · 0 comments
Open

You may want to update the documentation #22

Shamino0 opened this issue Feb 3, 2021 · 0 comments

Comments

@Shamino0
Copy link

Shamino0 commented Feb 3, 2021

I'm starting to experiment with this code and discovered some incompatibilities with modern Linux distributions that you may want to address.

  1. Because it relies on TensorFlow 1.x, it is incompatible with Python 3.8 and later. Ubuntu 20.04 ships with Python 3.8 and 3.9, and has no support for earlier versions. I worked around this by installing Ubuntu 18.04 (with its Python 3.6) in a VM. I assume I could also manually install Python 3.6 on a more recent Linux distribution as well.
  2. I followed the Readme file to install prerequisite packages. The latest versions of pip, virtualenv, numpy, jupyterlab, matplotlib and h5py. Then tensorflow 1.14 and keras 2.2.4. Running the jupyter notebook's instructions with this configuration caused numpy to produce a lot of deprecated function warnings:
.../venv/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type,  (1,)) / '(1,)type'. 
   _np_qint8 = np.dtype([("qint8", np.int8, 1)])

I worked around this by downgrading numpy to version 1.16.4 (the version in your requirements.txt file).

  1. After that, in steps 1.2 and 1.3 (build/load the model), I got errors from Keras:
.../venv/lib/python3.6/site-packages/keras/engine/saving.py in _deserialize_model(f, custom_objects, compile) 
    222     if model_config is None:
    223         raise ValueError('No model found in config.')
--> 224     model_config = json.loads(model_config.decode('utf-8'))
    225     model = model_from_config(model_config, custom_objects=custom_objects)
    226     model_weights_group = f['model_weights']

AttributeError: 'str' object has no attribute 'decode'

Upgrading tensorflow to version 1.15.5 (different from the version in the Readme file) fixed this.

I would therefore suggest that the quick-start instructions include these revisions. Something like:

pip3 install virtualenv numpy==1.16.4 jupyterlab matplotlib h5py tensorflow==1.15.5 keras==2.2.4

Along with a statement that Python version 3.7 or older is required.

mjmarin added a commit that referenced this issue Feb 4, 2021
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