TNN icon indicating copy to clipboard operation
TNN copied to clipboard

不支持两维以下的tensor运算。。。。

Open qingyang-jiandao opened this issue 2 years ago • 0 comments

不支持两维以下的tensor运算。。。。

比如, pred_camera是二维tensor: pred_cam_t = torch.stack([pred_camera[:, 1], pred_camera[:, 2], 2 * 5000. / (224. * pred_camera[:, 0] + 1e-9)], dim=-1) 要转化为三维 translation_cell = pred_camera.unsqueeze(1) translation = translation_cell for i in range(joint_num-1): translation = torch.cat([translation, translation_cell], dim=1) pred_cam_t = torch.stack([translation[:, :, 1], translation[:, :, 2], 2 * 5000. / (224. * translation[:, :, 0] + 1e-9)], dim=-1)

### Tasks

qingyang-jiandao avatar Jun 20 '23 08:06 qingyang-jiandao