elixir-nx / ortex

ONNX Runtime bindings for Elixir
MIT License
122 stars 15 forks source link

adding concat functionality #22

Closed gregszumel closed 8 months ago

gregszumel commented 8 months ago

Allows for concatenating n tensors, given that the tensors have the same underlying type. Will raise a runtime error if they have a different type. Should partially close #11 (still need to allow for concatenating tensors with varying types).

mortont commented 8 months ago

Thanks Greg! We talked about this offline, but for visibility: I think using macros to shorten the verbosity of this would be nice. And once https://github.com/rusterlium/rustler/pull/574 is in a release I think we could make this a lot cleaner with generics.

gregszumel commented 8 months ago

Agreed - swapping the repetitive calls for a macro makes the change much more succinct, while maintaining readability

gregszumel commented 8 months ago

I think those are good nits, made those changes in latest