VeriSilicon / tflite-vx-delegate

Tensorflow Lite external delegate based on TIM-VX
MIT License
41 stars 23 forks source link

Multiple downstream outputs bug #32

Closed bkovalenkocomp closed 2 years ago

bkovalenkocomp commented 2 years ago

Sorry for making duplicates. Im not sure bug is in vx-delegate or in TIM-VX.

Hi, I think I found a bug in the vx-delegate runtime.

setup: A311D + Android 9 + TensorFlow Lite with vx-delegate

Model: detector, that outputs multiple things: BBoxes, Landmarks, Probability scores and features vectors.

Problem: Landmarks outputs are garbage. How model works for landmarks:

input image -> backbone -> FPN -> Conv layers that produces features (OUTPUT 1) -> Conv layers that produces landmarks (OUTPUT 2)

so, if I have two outputs, that are downstream one after another, second outputs is not calculated and I get garbage output. The problem is only with INT8 graph, if I use FP32 graph, it works fine with vx-delegate.

On x86 with standard TFLite (and xnnpack) everything works fine with both INT8 and FP32 graphs.

update: Downstream is not important, even if in landmarks branch of graph I have only landmarks as outputs, I get garbage. I don't know why, but part of the graph with landmarks is not calculated on the NPU.

What could be the problem? Thanks.

bkovalenkocomp commented 2 years ago

issue is here https://github.com/VeriSilicon/TIM-VX/issues/226