hotg-ai / rune

Rune provides containers to encapsulate and deploy edgeML pipelines and applications
Apache License 2.0
134 stars 15 forks source link

Implement tensor slicing #362

Closed Michael-F-Bryan closed 2 years ago

Michael-F-Bryan commented 2 years ago

This enhances the hotg_rune_core::Tensor type by letting people view a contiguous subsection of a tensor.

You might use this if, for example, you had a f32[1, 256, 256, 3] tensor and wanted to access elements [0, i, j, ..] as a &[f32; 3].

Mohit0928 commented 2 years ago

@Michael-F-Bryan, Perfect, This would be sufficient. Thanks