candle icon indicating copy to clipboard operation
candle copied to clipboard

load_image and load_image_and_resize return different permutations

Open jeroenvlek opened this issue 1 year ago • 0 comments

In candle-examples/src/lib.rs the function load_image returns (channels, height, width), but the function load_image_and_resize returns (channels, width, height):

let data = Tensor::from_vec(data, (height, width, 3), &Device::Cpu)?.permute((2, 0, 1))?;

and

Tensor::from_vec(data, (width, height, 3), &Device::Cpu)?.permute((2, 0, 1))

jeroenvlek avatar Jun 27 '24 08:06 jeroenvlek