robertknight / rten

ONNX neural network inference engine
124 stars 9 forks source link

Generalize `Output` => `Tensor`/`TensorView` convenience methods #383

Closed robertknight closed 1 month ago

robertknight commented 1 month ago

Replace Output::{into_int, into_float} with generic into_tensor and Output::{as_float_ref, as_int_ref} with generic as_tensor_view.

This adds support for u8/i8 tensors and other types as they are added in future.