gosha20777 / keras2cpp

it's a small library for running trained Keras 2 models from a native C++ code.
MIT License
185 stars 54 forks source link

Invalid Syntax Error #7

Open erwincoumans opened 5 years ago

erwincoumans commented 5 years ago

Thanks for sharing this interesting project!

Ubuntu, Python 3.5.4, Keras 2.2.4 running python3 python_model.py returns this error:

Traceback (most recent call last):
  File "python_model.py", line 22, in <module>
    from keras2cpp import export_model
  File "/usr/local/google/home/erwincoumans/develop/keras2cpp/keras2cpp.py", line 60
    f.write(struct.pack(f'={remaining}f', *data[i: i + remaining]))
                                       ^
SyntaxError: invalid syntax

Do you have any idea what this is about?

gosha20777 commented 5 years ago

Please try to use Python 3.6

miqianmimi commented 5 years ago
from keras2cpp import export_model

ImportError: cannot import name 'export_model'