pub mod coco_classes; pub mod imagenet; pub mod object_detection; use candle::{Device, Result, Tensor}; pub fn device(cpu: bool) -> Result { if cpu { Ok(Device::Cpu) } else { let device = Device::cuda_if_available(0)?; if !device.is_cuda() { println!("Running on CPU, to run on GPU, build this example with `--features cuda`"); } Ok(device) } }