Skip to content

[Relax][TFLite] Flatten FC input without keep_num_dims - #20784

Open
guan404ming wants to merge 1 commit into
apache:mainfrom
guan404ming:fix-tflite-fc-keep-num-dims
Open

guan404ming wants to merge 1 commit into
apache:mainfrom
guan404ming:fix-tflite-fc-keep-num-dims

Conversation

@guan404ming

@guan404ming guan404ming commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

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

@guan404ming
guan404ming marked this pull request as ready for review October 17, 2026 22:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant