Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[res] Introduce Reshape_004 tflite recipe #14151

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions res/TensorFlowLiteRecipes/Reshape_004/test.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Test model of Reshape with 0 in shape.
# May not work in interpreter.
operand {
name: "ifm"
type: FLOAT32
shape { dim: 1 dim: 3 dim: 2 dim: 3 }
}
operand {
name: "shape"
type: INT32
shape { dim: 3 }
filler { tag: "explicit" arg: "0" arg: "3" arg: "-1" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question,
Is 0 value always converted to 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This situation is from ONNX, where dim 0 will follow that from input, not to 1.
As of now, I've only seen model with input with dim value of 1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

}
operand {
name: "ofm"
type: FLOAT32
shape { dim: 1 dim: 3 dim: 6 }
}
operation {
type: "Reshape"
reshape_options {
new_shape: 0
new_shape: 3
new_shape: -1
}
input: "ifm"
input: "shape"
output: "ofm"
}
input: "ifm"
output: "ofm"