我如何使用GPU通过tf.lite.Interpreter(在python中)运行tflite模型(* .tflite)?

问题描述 投票:1回答:1

根据https://www.tensorflow.org/lite/convert的指示,我已将张量流推断图转换为tflite模型文件(* .tflite)。

我在具有4个Nvidia TITAN GPU的GPU服务器上测试了tflite模型。我使用tf.lite.Interpreter加载并运行tflite模型文件。

它就像以前的张量流图一样工作,但是问题是推论变得太慢了。当我找出原因时,我发现当tf.lite.Interpreter运行时,GPU利用率仅为0%。

有没有可以在GPU支持下运行tf.lite.Interpreter的方法?

python tensorflow interpreter tensorflow-lite
1个回答
0
投票

https://github.com/tensorflow/tensorflow/issues/34536

CPU对于tflite来说已经足够好了,尤其是多核。

nvidia GPU可能未针对tflite(针对移动GPU平台)进行更新。

© www.soinside.com 2019 - 2024. All rights reserved.