crystal-data / num.cr

Scientific computing in pure Crystal
MIT License
151 stars 12 forks source link

add support for Tensors from slices #90

Closed stakach closed 1 year ago

stakach commented 1 year ago

Having not really studied this aspect of computing I'm a little naive on how things work. I asked a question on the crystal forums but have been diving into the code and will need to pass slices in directly to avoid the memory copy operations required to convert the slice into an array before passing that to num.cr so figured I'd add the required functionality to the library

This pull is not the place for my questions but if you do have time I would love any advice you can provide https://forum.crystal-lang.org/t/num-cr-v1-0-0-released/4036/2

I'm working on improving performance of these projects with the use of num.cr https://github.com/spider-gazelle/tensorflow_lite https://github.com/spider-gazelle/tflite_image

anyway, let me know if there are any tweaks you would like in this pull

christopherzimmerman commented 1 year ago

Hey, thanks for the PR! Sorry for the late response, for some reason I never got a notification for this. LGTM!