pytorch tensor cat for循环每次的tensor

detections_out = torch.tensor([], dtype=torch.float32).to(model_out[0].device)

for i in range(5):
   detections = torch.cat([bboxes, scores, clses], dim=2) ##[b, nums, 6]
   detections_out = torch.cat([detections_out, detections], dim=1)
posted @ 2023-03-10 13:56  无左无右  阅读(118)  评论(0编辑  收藏  举报