You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
I'm trying to use raw_ops::decode_image to load an image directly from a u8 slice (as opposed to from file as per the example), but it seems I must first convert the slice to a scalar tensor string.
It appears I can make this work with something like:
let s = unsafe { String::from_utf8_unchecked(image_bytes.to_vec()) };
My concern is that Rust expects all strings to be utf8 encoded, of which the above certainly is not.
Am I missing something obvious? Is there a better way to approach this?