我正在尝试遵循本教程如何部署您的自定义TensorFlow模型以react native转换我的模型以部署到我的reactjs webapp。
(Thesis) C:UsersJHON MICHEAL>tensorflowjs_converter --input_format=keras C:UsersJHON MICHEALDesktopTanModelimage-modelrabbit.h5 C:UsersJHON MICHEALDesktopTanModelimage-modelrabbit.h5
2022-11-18 15:30:20.943680: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-11-18 15:30:20.944067: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
usage: TensorFlow.js model converters. [-h]
[--input_format {tf_frozen_model,tf_saved_model,tf_hub,tfjs_layers_model,keras_saved_model,keras}]
[--output_format {tfjs_layers_model,keras_saved_model,keras,tfjs_graph_model}]
[--signature_name SIGNATURE_NAME] [--saved_model_tags SAVED_MODEL_TAGS]
[--quantize_float16 [QUANTIZE_FLOAT16]] [--quantize_uint8 [QUANTIZE_UINT8]]
[--quantize_uint16 [QUANTIZE_UINT16]] [--quantization_bytes {1,2}]
[--split_weights_by_layer] [--version] [--skip_op_check]
[--strip_debug_ops STRIP_DEBUG_OPS]
[--use_structured_outputs_names USE_STRUCTURED_OUTPUTS_NAMES]
[--weight_shard_size_bytes WEIGHT_SHARD_SIZE_BYTES]
[--output_node_names OUTPUT_NODE_NAMES] [--control_flow_v2 CONTROL_FLOW_V2]
[--experiments EXPERIMENTS] [--metadata METADATA]
[input_path] [output_path]
TensorFlow.js model converters.: error: unrecognized arguments: C:UsersJHON MICHEALDesktopTanModelimage-modelrabbit.h5
但是我得到了这个结果。
这个论点似乎是不正确的
——input_format = keras
,需要更改为
——input_format keras
你可以在这里看到细节https://www.tensorflow.org/js/tutorials/conversion/import_keras