美文网首页
Mac pb转tflite

Mac pb转tflite

作者: 平原河流 | 来源:发表于2020-03-17 15:55 被阅读0次

格式

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]
            [--target_ops TARGET_OPS] [--dump_graphviz_dir DUMP_GRAPHVIZ_DIR]
            [--dump_graphviz_video]

示例

toco \
--graph_def_file=/Users/ll/Desktop/voc_gesture/export/tflite_graph.pb \
--output_file=/Users/ll/Desktop/voc_gesture/convert/gesture_model.tflite \
--output_format=TFLITE  \
--inference_type=FLOAT \
--input_shapes=1,300,300,3 \
--input_format=TENSORFLOW_GRAPHDEF  \
--input_arrays=normalized_input_image_tensor \
--output_arrays='TFLite_Detection_PostProcess','TFLite_Detection_PostProcess:1','TFLite_Detection_PostProcess:2','TFLite_Detection_PostProcess:3' \
--mean_values=128 \
--std_dev_values=128 \
--default_ranges_min=0 \
--default_ranges_max=6 \
--allow_custom_ops
toco \
--graph_def_file=/Users/ll/Desktop/voc_gesture/export/tflite_graph.pb \
--output_file=/Users/ll/Desktop/voc_gesture/convert/gesture_model.tflite \
--output_format=TFLITE  \
--inference_type=FLOAT \
--input_shapes=1,300,300,3 \
--input_format=TENSORFLOW_GRAPHDEF  \
--input_arrays=normalized_input_image_tensor \
--output_arrays='TFLite_Detection_PostProcess','TFLite_Detection_PostProcess:1','TFLite_Detection_PostProcess:2','TFLite_Detection_PostProcess:3' \
--mean_values=128 \
--std_dev_values=128 \
--allow_custom_ops

相关文章

  • Mac pb转tflite

    格式 示例

  • Mac 使用conda 安装tensorflow

    因为pb 转tflite出错,百度了各种方法都不能有效的解决,看到有一种是使用tensorflow 2以下版本解决...

  • 移动端使用mtcnn进行人脸关键点检测方案

    1.基于tensorflow-lite 采用开源实现生成相应的pb文件,然后转化成tflite文件,此处注意mtc...

  • 2018-07-20

    在将训练好的模型转换为.tflite格式要经过两个步骤,首先是进行freeze_graph转换为.pb格式,再进行...

  • tensorflow lite部署

    1.模型转换 将pb模型转换成tflite模型,注意op的兼容性。当时错误在tf.cast不支持。 python上...

  • pytorch转tflite实践

    这个世界总是有各种各样的幺蛾子,所以我们要做各种各样的转换,就像今天要写的pytorch模型需要被转换成tflit...

  • 用android studio 开发tensorflow lit

    准备tflite模型 在源码目录下新建asserts目录,将model.tflite, labels.txt文件拷...

  • 可转债投资公式

    (1)PB=市净率=现股价÷净资产,一般越高越好。 (2)转股价值=100÷转股价×正股现价。 (3)溢价率=(转...

  • ckpt文件 转 pb文件

    tensorflow中,将ckpt形式的模型转换为pb形式,以便跨平台调用,是一种常见操作。代码如下: 强调两点:...

  • Tensorflow 从onnx转.pb

    首先需要安装onnx和onnx-tf这两个包,用pip安装就行

网友评论

      本文标题:Mac pb转tflite

      本文链接:https://www.haomeiwen.com/subject/xewmkhtx.html