Repository navigation
[Relax][TFLite] Flatten FC input without keep_num_dims - #20784
Merged
Merged
Conversation
guan404ming
marked this pull request as ready for review
October 17, 2026 22:10
tlopex
reviewed
Nov 15, 2026
tlopex
left a comment
Member
There was a problem hiding this comment.
Hi @guan404ming Could you rebase this onto main? Thanks
guan404ming
force-pushed
the
fix-tflite-fc-keep-num-dims
branch
from
November 18, 2026 08:04
9081f61 to
ac902c1
Compare
Member
Author
|
Thanks, rebased onto main |
tlopex
approved these changes
Nov 18, 2026
Member
Author
|
Thanks! |
Netra-Srinivasan-McW
pushed a commit
to Netra-Srinivasan-McW/tvm-mcw
that referenced
this pull request
Nov 20, 2026
## Why - TFLite `FULLY_CONNECTED` with `keep_num_dims=false` returns a 2-D output, but the Relax importer kept the input rank - A 3-D input therefore produced a 3-D result that did not match TFLite ## How - Flatten inputs with rank above 2 to `[-1, n_inputs]` when `keep_num_dims` is false - Remove the resolved TODO about the `keep_num_dims` output shape - Add `test_fully_connected_flattens_input_without_keep_num_dims`, a structural IR test with a 3-D input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
FULLY_CONNECTEDwithkeep_num_dims=falsereturns a 2-D output, but the Relax importer kept the input rankHow
[-1, n_inputs]whenkeep_num_dimsis falsekeep_num_dimsoutput shapetest_fully_connected_flattens_input_without_keep_num_dims, a structural IR test with a 3-D input