pub fn nms_by_scores_cuda(
    dets: &Tensor,
    scores: &Tensor,
    groups: &Tensor,
    iou_threshold: f64,
) -> Result<Tensor, TchError> {
    let dets = dets.as_ptr();
    let scores = scores.as_ptr();
    let groups = groups.as_ptr();

    // create uninitialized output tensors
    let mut keep: *mut C_tensor = ptr::null_mut();

    unsafe_torch_err!(nms_cuda_ffi(
        &mut keep as *mut _,
        dets,
        scores,
        groups,
        iou_threshold,
    ));

    unsafe {
        let keep = Tensor::from_ptr(keep);
        Ok(keep)
    }
}
/// Run Non-Maximum Suppression algorithm on CUDA device.
///
/// Input tensors must be on CUDA device. Otherwise the function will panic.
Run Non-Maximum Suppression algorithm on CUDA device.
Input tensors must be on CUDA device. Otherwise the function will panic.
Run Non - Maximum Suppression algorithm on CUDA device . Input tensors must be on CUDA device . Otherwise the function will panic .
pub fn nms_by_scores_cuda(
    dets: &Tensor,
    scores: &Tensor,
    groups: &Tensor,
    iou_threshold: f64,
) -> Result<Tensor, TchError> {
    let dets = dets.as_ptr();
    let scores = scores.as_ptr();
    let groups = groups.as_ptr();
    // create uninitialized output tensors
    let mut keep: *mut C_tensor = ptr::null_mut();
    unsafe_torch_err!(nms_cuda_ffi(
        &mut keep as *mut _,
        dets,
        scores,
        groups,
        iou_threshold,
    ));
    unsafe {
        let keep = Tensor::from_ptr(keep);
        Ok(keep)
    }
}
pub fn nms_by_scores_cuda ( dets : & Tensor , scores : & Tensor , groups : & Tensor , iou_threshold : f64 , ) -> Result < Tensor , TchError > { let dets = dets . as_ptr ( ) ; let scores = scores . as_ptr ( ) ; let groups = groups . as_ptr ( ) ; // create uninitialized output tensors let mut keep : * mut C_tensor = ptr :: null_mut ( ) ; unsafe_torch_err ! ( nms_cuda_ffi ( mut keep as mut dets scores groups iou_threshold ) ) ; unsafe { let keep = Tensor :: from_ptr ( keep ) ; Ok ( keep ) } }
Run Non-Maximum Suppression algorithm on CUDA device.
Run Non - Maximum Suppression algorithm on CUDA device .
dets
&Tensor
scores
&Tensor
groups
&Tensor
iou_threshold
f64
dets
&Tensor
scores
&Tensor
groups
&Tensor
iou_threshold
f64