tensorspace-converter icon indicating copy to clipboard operation
tensorspace-converter copied to clipboard

Keras converting for tye 'None' ?

Open WeisongZhao opened this issue 6 years ago • 0 comments

I have saved a keras model using model.save('xxx.hdf5'), but when I try to convert it using:

tensorspacejs_converter \
    --input_model_from="keras" \
    --input_model_format="topology_weights_combined" \
    --output_node_names='conv2D_1,conv2D_2,conv2D_3,conv2D_4,conv2D_5,conv2D_6,conv2D_7,up_sampling2d_1,conv2D_8,up_sampling2d_2,conv2D_9,up_sampling2d_3,conv2D_10,up_sampling2d_4,conv2D_11,up_sampling2d_5,conv2D_12,up_sampling2d_6,conv2D_13,up_sampling2d_7,conv2D_14' \
    ../rawModel/combined/model_Encry_keras.hdf5 \
    ../convertedModel/

How can I fix it, because I don't know where goes wrong?

Traceback (most recent call last):
  File "c:\programdata\anaconda3\envs\tensorspace\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\programdata\anaconda3\envs\tensorspace\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\envs\tensorspace\Scripts\tensorspacejs_converter.exe\__main__.py", line 9, in <module>
  File "c:\programdata\anaconda3\envs\tensorspace\lib\site-packages\tensorspacejs\tsp_converters.py", line 131, in main
    'but the current input model format is "%s".' % flags.input_model_format)
ValueError: For input_model_from == "keras", the --input_model_format flag can only be set to"topology_weights_combined" and "topology_weights_separated" but the current input model format is "None".

WeisongZhao avatar Aug 07 '19 13:08 WeisongZhao