Tencent / TNN

TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.
Other
4.38k stars 766 forks source link

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

Open qingyang-jiandao opened 1 year ago

qingyang-jiandao commented 1 year ago

不支持两维以下的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