tensorflow / tensorflow/tflite-micro

TFLM output does not match TfLite output for Conv OP

Open
#3,130 5 comments 3 reactions 1 assignee View on GitHub

@ddavis-2015 is already working on this.

Since Jul 8, 2025.

Dominant language
C++
Stars
3.1k
Forks
1.1k
Avg merge
1d 5h
Merged PRs (30d)
43

Description

First found during manual testing and confirmed with layer_by_layer_debugger script.
Output:

AssertionError: 
Arrays are not equal


TFLM output does not match TfLite output.
 Subgraph number is 0 
 Layer number is 2 
 The Tensor Index where this output does not match is 46 



Mismatched elements: 80 / 51200 (0.156%)
Max absolute difference among violations: 1
Max relative difference among violations: 1.
 ACTUAL: array([[[[   7,   14,    6,   17,    4,   -5,  -20,    8],
         [   1,  -34,   15,  -12,   15,   15,    7,    6],
         [   2,   15,   -5,   47,    6,   -6,   -3,    0],...
 DESIRED: array([[[[   7,   14,    6,   17,    4,   -5,  -20,    8],
         [   1,  -34,   15,  -12,   15,   15,    7,    6],
         [   2,   15,   -5,   47,    6,   -6,   -3,    0],...

The model in question is attached:

tflite_learn_977.tflite.zip

The difference is between optimized Conv kernel used in full tflite and reference kernel used in tflite micro.

Potentially related:
https://github.com/tensorflow/tflite-micro/issues/2629

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.