candle
candle copied to clipboard
Error: device mismatch in conv2d, lhs: Cpu, rhs: Metal { gpu_id: 4294968713 }
trafficstars
cargo run --example resnet --release --features metal -- --image test.jpg
help to solve this problem! Thanks!
maybe this similar to https://github.com/huggingface/candle/issues/1838
I just pushed a fix for the device mismatch in #1856 but now it's running into the missing metal kernel for max-pool as in #1838.
Actually the missing maxpool kernel was just added by @tomsanbear in #1863 and now the resnet example properly works on metal.
$ cargo run --example resnet --release --features metal -- --image ~/Downloads/tiger.jpeg
loaded image Tensor[dims 3, 224, 224; f32, metal:4294968416]
model built
tiger, Panthera tigris : 89.93%
tiger cat : 9.68%
zebra : 0.22%
jaguar, panther, Panthera onca, Felis onca: 0.06%
tabby, tabby cat : 0.03%