mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Ensure to copy data to cpu before iterating. (#1360)
This commit is contained in:
@ -43,6 +43,7 @@ pub fn report(
|
||||
confidence_threshold: f32,
|
||||
nms_threshold: f32,
|
||||
) -> Result<DynamicImage> {
|
||||
let pred = pred.to_device(&Device::Cpu)?;
|
||||
let (npreds, pred_size) = pred.dims2()?;
|
||||
let nclasses = pred_size - 5;
|
||||
// The bounding boxes grouped by (maximum) class index.
|
||||
|
Reference in New Issue
Block a user