How to concatenate strings in ONNX?
See original GitHub issueAsk a Question
Question
We have a use case where we would like to concatenate string tensor pairwise. Here is some pseudo code of what I’m trying to accomplish:
tensor1 = ["a", "b", "c"]
tensor2 = ["d", "e", "f"]
concat(tensor1, tensor2)
> ["ad", "be", "cf"]
# Should also support broadcasting
concat(tensor1, "g")
> ["ag", "bg", "cg"]
The existing concat
is not helping me, as it only concats the tensor into a tensor of a higher rank instead of concatenating the strings.
Is it possible to accomplish this with the current ONNX operator set?
Further information
-
Relevant Area (e.g. model usage, backend, best practices, converters, shape_inference, version_converter, training, test, operators):
-
Is this issue related to a specific model? No.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Concat — Python Runtime for ONNX
Concatenate a list of tensors into a single tensor. All input tensors must have the same shape, except for the dimension size of...
Read more >onnx/Operators.md at main - GitHub
Concatenate a sequence of tensors into a single tensor. All input tensors must have the same shape, except for the dimension size of...
Read more >Concat - 1 vs 11 — ONNX 1.12.0 documentation
- Concatenate a list of tensors into a single tensor . All input tensors must have the same shape, except for the dimension...
Read more >Merging ONNX graphs - Towards Data Science
Join, Merge, Split, and concatenate ONNX graphs using sclblonnx. ONNX is getting more and more popular. While initially conceived predominantly ...
Read more >ONNX Operators for Regex Replacements - Stack Overflow
Use the OnnxUnique operator and it's inverse_indicies property to translate the input string to something approximating each character's ASCII ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI this feature is one that is being requested in the ONNX Roadmap discussion. https://onnx.ai/news.html#new60
It will be discussed Sept 8th at 9pm EST Sept 8th (5:30 to 6pm – PST)
Check the link above on how to join.
Thanks! I will close this issue for now.