tensorflow - 使用 toco 命令将 .tflite 转换为 .pb 抛出错误“TENSORFLOW_GRAPHDEF”(从“TFLITE”、“GRAPHVIZ_DOT”中选择)
问题描述
我尝试使用现有帖子将 .tflite 转换为 .pb中提到的命令将 tflite 转换为 pb,但它的抛出错误。
使用的命令:
toco --output_file=/smartreply.pb --output_format=TENSORFLOW_GRAPHDEF --input_format=TFLITE --input_file=/smartreply.tflite --inference_type=FLOAT --input_type=FLOAT --input_array="" --output_array="" --input_shape=1,450,450,3 --dump_grapHviz=./
错误:
usage: toco [-h] --output_file OUTPUT_FILE
(--graph_def_file GRAPH_DEF_FILE | --saved_model_dir SAVED_MODEL_DIR | --keras_model_file KERAS_MODEL_FILE)
[--output_format {TFLITE,GRAPHVIZ_DOT}]
[--inference_type {FLOAT,QUANTIZED_UINT8}]
[--inference_input_type {FLOAT,QUANTIZED_UINT8}]
[--input_arrays INPUT_ARRAYS] [--input_shapes INPUT_SHAPES]
[--output_arrays OUTPUT_ARRAYS]
[--saved_model_tag_set SAVED_MODEL_TAG_SET]
[--saved_model_signature_key SAVED_MODEL_SIGNATURE_KEY]
[--std_dev_values STD_DEV_VALUES] [--mean_values MEAN_VALUES]
[--default_ranges_min DEFAULT_RANGES_MIN]
[--default_ranges_max DEFAULT_RANGES_MAX]
[--post_training_quantize] [--drop_control_dependency]
[--reorder_across_fake_quant]
[--change_concat_input_ranges {TRUE,FALSE}] [--allow_custom_ops]
[--converter_mode {DEFAULT,TOCO_FLEX,TOCO_FLEX_ALL}]
[--dump_graphviz_dir DUMP_GRAPHVIZ_DIR] [--dump_graphviz_video]
toco: error: argument --output_format: invalid choice: 'TENSORFLOW_GRAPHDEF' (choose from 'TFLITE', 'GRAPHVIZ_DOT')
解决方案
目前您无法将 tflite 文件转换回 .pb
推荐阅读
- javascript - 自动调整文本区域的大小以在加载时显示所有文本,而无需在 Blazor 中滚动
- reporting-services - SSRS 将日期时间参数设置为今天,但可用值是任何日期
- visual-studio - 多个 VLAN 上的团队是否连接到单个 Team Foundation Server?
- c++ - If I write a string literal in a block, will the entire string data be copied from data section?
- c++ - 寻求帮助以找到我无法解决的堆栈溢出错误的来源
- php - Symfony 4 用关系更新理论实体
- r - 未生成图表
- python - 出于某种原因,当我在终端中进行操作时,我在文件中没有正确的 python 权限
- c# - Microsoft Office 12.0 Access 数据库引擎 OLE DB Provider
- tensorflow - Tensorflow 2:在训练期间获取张量值