-
Notifications
You must be signed in to change notification settings - Fork 159
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] Add TensorFlowLiteRecipes for broadcast Add #14570
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
operand { | ||
name: "ifm1" | ||
type: FLOAT32 | ||
shape { dim: 2 dim: 2 dim: 2 dim: 3 } | ||
} | ||
operand { | ||
name: "ifm2" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 2 dim: 2 dim: 3 } | ||
filler { | ||
tag: "explicit" | ||
arg: "1" arg: "2" arg: "-3" arg: "-1" | ||
arg: "1" arg: "2" arg: "-3" arg: "-1" | ||
arg: "1" arg: "2" arg: "-3" arg: "-1" | ||
} | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 2 dim: 2 dim: 2 dim: 3 } | ||
} | ||
operation { | ||
type: "Add" | ||
input: "ifm1" | ||
input: "ifm2" | ||
output: "ofm" | ||
add_options { | ||
activation: NONE | ||
} | ||
} | ||
input: "ifm1" | ||
output: "ofm" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
operand { | ||
name: "ifm1" | ||
type: FLOAT32 | ||
shape { dim: 4 dim: 2 dim: 3 } | ||
} | ||
operand { | ||
name: "ifm2" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 2 dim: 3 } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broadcast to dim 0, with rank 3 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI, in |
||
filler { | ||
tag: "explicit" | ||
arg: "1" arg: "2" | ||
arg: "3" arg: "4" | ||
arg: "-3" arg: "-1" | ||
} | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 4 dim: 2 dim: 3 } | ||
} | ||
operation { | ||
type: "Add" | ||
input: "ifm1" | ||
input: "ifm2" | ||
output: "ofm" | ||
add_options { | ||
activation: NONE | ||
} | ||
} | ||
input: "ifm1" | ||
output: "ofm" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
operand { | ||
name: "ifm1" | ||
type: FLOAT32 | ||
shape { dim: 4 dim: 2 dim: 3 } | ||
} | ||
operand { | ||
name: "ifm2" | ||
type: FLOAT32 | ||
shape { dim: 4 dim: 1 dim: 3 } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broadcast to dim 1, with rank 3 |
||
filler { | ||
tag: "explicit" | ||
arg: "1" arg: "2" arg: "1" arg: "2" | ||
arg: "3" arg: "4" arg: "-5" arg: "-6" | ||
arg: "7" arg: "12" arg: "-12" arg: "-2" | ||
} | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 4 dim: 2 dim: 3 } | ||
} | ||
operation { | ||
type: "Add" | ||
input: "ifm1" | ||
input: "ifm2" | ||
output: "ofm" | ||
add_options { | ||
activation: NONE | ||
} | ||
} | ||
input: "ifm1" | ||
output: "ofm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add_003-006 includes examples broadcasting of last dimension.
Here, I add first-mid dimension broadcasting examples.
Add_007: broadcast to dim 0