gpt4 book ai didi

python - 在 Tensorflow 2.X 中测量 TFLite 模型的触发器

转载 作者:行者123 更新时间:2023-12-04 08:16:26 26 4
gpt4 key购买 nike

我正在尝试为 TF2 中的 TFLite 模型测量 FLOPS。
我知道 Tensorflow 1.x 有 tf.profiler,它非常适合测量触发器。它似乎不适用于 tf.keras。
有人能描述一下如何在 TF2 中测量 TFLite 模型的 FLOPs 吗?我似乎无法在网上找到答案。
非常感谢大家的时间。
编辑:下面评论的链接对 tflite 没有帮助。

最佳答案

遇到了同样的问题,写了一个简单的python包来粗略计算FLOPS。
https://github.com/lisosia/tflite-flops
只考虑了 Conv 和 DepthwiseConv 层,但这对于我的用例来说已经足够了。

关于python - 在 Tensorflow 2.X 中测量 TFLite 模型的触发器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65679735/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com