摘要: pytorch/libtorch qq群2群:302984355 pytorch/libtorch qq群: 1041467052(一群满了) 其实pytorch的函数libtorch都有,只是写法上有些出入。 libtorch的官方文档链接 class tensor 只是官方文档只是类似与函数申明 阅读全文
posted @ 2020-05-16 18:14 无左无右 阅读(41398) 评论(1) 推荐(6)
摘要: sudo kill -9 $(pgrep -f sunlogin) 阅读全文
posted @ 2026-08-20 16:53 无左无右 阅读(5) 评论(0) 推荐(0)
摘要: #[2,23] cls_target = torch.stack( [ F.pad(x, (0, max_dn_gt - x.shape[0]), value=-1) for x in cls_target ] #cls_target[0]23 cls_target[1]20 max_dn_gt23 阅读全文
posted @ 2026-07-24 15:09 无左无右 阅读(9) 评论(0) 推荐(0)
摘要: box_target = torch.where( cls_target[..., None] == -1, box_target.new_tensor(0), box_target ) cls_target[b,23] cls_target[..., None] [b,23,1] box_targ 阅读全文
posted @ 2026-07-20 21:18 无左无右 阅读(7) 评论(0) 推荐(0)
摘要: requirement.txt numba==0.53.1 numpy==1.19.5 nuscenes-devkit==1.1.9 mmcv==1.4.8 mmcv-full==1.4.0 mmdet==2.19.1 mmdet3d==1.0.0rc0 mmsegmentation==0.20.2 阅读全文
posted @ 2026-06-12 15:07 无左无右 阅读(14) 评论(0) 推荐(0)
摘要: 行向量,右乘: P′=P@R.T 列向量,左乘: P′=R@P points shape = (B, N, P, 3),就看最后两个维度:unsqueeze(-1) → shape (B, N, P, 3, 1),最后两维是 (3, 1),这是列向量。3个点的3在倒数第二维度就是列向量,比如下面举例 阅读全文
posted @ 2026-06-05 15:58 无左无右 阅读(10) 评论(0) 推荐(0)
摘要: 在一个大文件夹下, .py脚本中递归查找含有"math.tan"字段的 grep -rl "math\.tan" /media/data_1/everyday/2025_down --include="*.py" 这条命令是一个在 Linux/Unix 系统中非常经典的 文件内容搜索组合拳。它的核心 阅读全文
posted @ 2026-06-02 13:47 无左无右 阅读(11) 评论(0) 推荐(0)
摘要: [ 0.01236276, -0.03470584, 0.9993211, 2.052727 ] [ -0.99991938, 0.00246558, 0.01245579, -0.0054 ] [ -0.00289619, -0.99939453, -0.03467256, 1.4633291 ] 阅读全文
posted @ 2026-05-29 09:52 无左无右 阅读(7) 评论(0) 推荐(0)
摘要: torch.where(condition, x, y) 是一个三元运算符:如果条件为真,取 x 的值;如果条件为假,保持 y(即原本的 weights)不变。 if self.cls_wise_reg_weights is not None: for cls, weight in self.cls 阅读全文
posted @ 2026-05-21 14:48 无左无右 阅读(6) 评论(0) 推荐(0)
摘要: #cls_scores list6 every [1,900,10] reg_preds list6,[1,900,11] @force_fp32(apply_to=('cls_scores', 'reg_preds')) def loss(self, cls_scores, reg_preds, 阅读全文
posted @ 2026-05-21 11:17 无左无右 阅读(6) 评论(0) 推荐(0)
摘要: log_str += ', '.join(log_items) 这行是 Python 里很常见的 字符串拼接 + join 语法,拆开看其实很简单。 用 ", " 作为分隔符,把 list 里的字符串拼成一个长字符串 log_items = ["loss: 1.0", "lr: 0.001", "t 阅读全文
posted @ 2026-05-19 21:25 无左无右 阅读(10) 评论(0) 推荐(0)