Here 138 are some working examples:
auto ious = at::zeros(xy.type(), {10, 3, 1, 1, 2});
auto gt_target = at::empty(at::CUDA(at::kInt), {10, 3, 1, 1, 2});
auto target_obj_obj = obj.clone();
auto target_wh = warmup ? at::zeros_like(wh) : wh.clone();
auto target_xy = warmup ? at::full_like(xy, 0.5) : xy.clone();