【问题标题】:How to compile a embedding extractor on Edge TPU Model Compiler?如何在 Edge TPU 模型编译器上编译嵌入提取器?
【发布时间】:2019-09-21 03:35:33
【问题描述】:

在珊瑚上编译嵌入式提取器时出错

我正在尝试在我的珊瑚 edgeTPU 设备上重新训练图像分类器。因此,我按照Coral's "Retrain an image classification model on-device" tutorial 中解释的步骤进行操作:

嵌入式提取器创建

事实上,我根据给定的示例创建了一个嵌入提取器 tflite 文件:

tflite_convert \
--output_file=mobilenet_v1_embedding_extractor.tflite \
--graph_def_file=mobilenet_v1_1.0_224_quant_frozen.pb \
--input_arrays=input \
--output_arrays=MobilenetV1/Logits/AvgPool_1a/AvgPool

Edge TPU 模型编译器上传

我得到了文件 mobilenet_v1_embedding_extractor.tflite 并将其上传到 Edge TPU Model Compiler 。不幸的是,编译过程确实失败了,我收到以下错误消息:


ERROR: Something went wrong. Couldn't compile model.

More details
--------------
Start Time     2019-05-02T14:14:53.309219Z
State          FAILED
Duration       5.963912978s
Type           type.googleapis.com/google.cloud.iot.edgeml.v1beta1.CompileOperationMetadata
Name           operations/compile/16259636989695619987

根据我的理解,上述过程必须在使用classification_transfer_learning.py 脚本在 raspberryPi + edgeTPU/devBoard 上执行设备上学习之前完成。

希望你能给我一个解决问题的提示,提前谢谢。

2019 年 5 月 3 日更新

当我使用未修改的mobilenet_v1_1.0_224_quant.tflite 模型时,编译工作没有任何错误。

我使用来自tensorflowquantized model

【问题讨论】:

    标签: tensorflow tpu google-coral


    【解决方案1】:

    似乎缺少 tflite_convert 的一些标志。我们会尽快修复网站。请尝试:

    tflite_convert \
    --output_file=mobilenet_v1_embedding_extractor.tflite \
    --graph_def_file=mobilenet_v1_1.0_224_quant_frozen.pb \
    --inference_type=QUANTIZED_UINT8 \
    --mean_values=128 \
    --std_dev_values=128 \
    --input_arrays=input \
    --output_arrays=MobilenetV1/Logits/AvgPool_1a/AvgPool
    

    表示您要转换为量化模型,这是 edgetpu 转换器唯一有效的格式。使用这些标志,它应该可以正常工作。

    【讨论】:

      猜你喜欢
      • 2020-09-13
      • 2019-11-14
      • 2021-07-04
      • 2013-07-10
      • 1970-01-01
      • 2011-07-17
      • 2019-12-05
      • 1970-01-01
      • 2016-10-26
      相关资源
      最近更新 更多