Я хочу преобразовать модель ml5 Json в модель keras, чтобы снова преобразовать в tflite
Поэтому я пытаюсь выполнить преобразование с помощью преобразователя tf js, но это не работает
Windows10, Python версия 3.6.8
json ссылка на файл: https://github.com/CodingTrain/website/tree/master/learning/ml5/7.2_pose_classifier/p5-multi/1%20-%20Data%20Collection/model2
Я набрал вот так
python -m venv test
test\Scripts\activate
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install tensorflowjs
tensorflowjs_converter --input_format=tfjs_layers_model --output_format=keras_saved_model E:\h5\model\model.json E:\h5\outputs\
и, Это сообщение об ошибке
2020-04-07 18:58:54.659000: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Traceback (most recent call last):
File "C:\Users\Jun\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\Jun\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "E:\testvenv\Scripts\tensorflowjs_converter.exe\__main__.py", line 7, in <module>
File "e:\testvenv\lib\site-packages\tensorflowjs\converters\converter.py", line 671, in pip_main
main([' '.join(sys.argv[1:])])
File "e:\testvenv\lib\site-packages\tensorflowjs\converters\converter.py", line 675, in main
convert(argv[0].split(' '))
File "e:\testvenv\lib\site-packages\tensorflowjs\converters\converter.py", line 636, in convert
args.output_path)
File "e:\testvenv\lib\site-packages\tensorflowjs\converters\converter.py", line 264, in dispatch_tensorflowjs_to_keras_saved_model_conversion
model = keras_tfjs_loader.load_keras_model(config_json_path)
File "e:\testvenv\lib\site-packages\tensorflowjs\converters\keras_tfjs_loader.py", line 217, in load_keras_model
use_unique_name_scope=use_unique_name_scope)
File "e:\testvenv\lib\site-packages\tensorflowjs\converters\keras_tfjs_loader.py", line 64, in _deserialize_keras_model
model = tf.keras.models.model_from_json(json.dumps(model_topology_json))
File "e:\testvenv\lib\site-packages\tensorflow_core\python\keras\saving\model_config.py", line 96, in model_from_json
return deserialize(config, custom_objects=custom_objects)
File "e:\testvenv\lib\site-packages\tensorflow_core\python\keras\layers\serialization.py", line 106, in deserialize
printable_module_name='layer')
File "e:\testvenv\lib\site-packages\tensorflow_core\python\keras\utils\generic_utils.py", line 292, in deserialize_keras_object
config, module_objects, custom_objects, printable_module_name)
File "e:\testvenv\lib\site-packages\tensorflow_core\python\keras\utils\generic_utils.py", line 254, in class_and_config_for_serialized_keras_object
for key, item in cls_config.items():
AttributeError: 'list' object has no attribute 'items'
Как мне успешно конвертировать?