Skip to content

Commit 8cdb181

Browse files
committed
Switch pose aggregation from stack to cat
In `PyTorchRunner`, transformed pose tensors are now merged with `torch.cat(..., dim=0)` instead of `torch.stack`. This aligns aggregation with tensors that already carry a leading batch dimension and avoids introducing an extra axis.
1 parent 305b863 commit 8cdb181

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎dlclive/pose_estimation_pytorch/runner.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,10 @@ def _postprocess_top_down(
409409
)
410410
poses.append(transformed_pose)
411411

412-
return torch.stack(poses, dim=0)
412+
result = torch.cat(poses, dim=0)
413+
414+
if result.ndim != 3:
415+
raise ValueError(f"Expected result of shape (detections, bodyparts, coords), got {tuple(result.shape)}")
413416

414417

415418
def _parse_device(device: str | None) -> str:

0 commit comments

Comments
 (0)