Replies: 1 comment
-
You mean like this? let image = image::RgbImage::new(100, 500);
let ndarray_image: ndarray::Array3<f32> = ndarray::Array3::from_shape_vec(
(image.height() as usize, image.width() as usize, 3),
image.into_raw(),
)?.mapv(|v| v as f32 / 255.0); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
currently I'm creating a tensor with this approach (as seen in examples):
This is super slow and scales very badly for large data.
Are there any parallelization techniques i can use?
I didn't find anything within the ndarray crate.
Beta Was this translation helpful? Give feedback.
All reactions