02 2023 档案

摘要:torch.triu(input, diagonal=0, *, out=None) → Tensor 返回一个上三角矩阵 参数: input:输入的张量 diagonal:对角线 返回矩阵(二维张量)或矩阵批次 input 的上三角部分,结果张量 out 的其他元素设置为 0。 矩阵的上三角部分定 阅读全文
posted @ 2023-02-27 11:02 无左无右 阅读(119) 评论(0) 推荐(0) 编辑
摘要:需要直接打开项目工程文件夹,然后点击左侧的蜘蛛按钮然后点击生成launch.json launch.json ``` { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwli 阅读全文
posted @ 2023-02-24 15:23 无左无右 阅读(977) 评论(0) 推荐(0) 编辑
摘要:python中冒号实际上有两个意思: 1.全部选择 matrix1[1, :]表示matrix的第1行的所有元素 matrix1[:, 1]表示matrix的第1列的所有元素 2. 表示区间, 含左不含右 matrix1[1, 0:3]表示matrix的第1行的索引为[0, 3)的元素 matrix 阅读全文
posted @ 2023-02-23 21:34 无左无右 阅读(255) 评论(0) 推荐(0) 编辑
摘要:torch.cuda.synchronize() start = time.time() result = model(return_loss=False, rescale=True, **data) torch.cuda.synchronize() end = time.time() print( 阅读全文
posted @ 2023-02-17 18:05 无左无右 阅读(24) 评论(0) 推荐(0) 编辑
摘要:方法1: python -m pip install 方法2: 转载自: https://blog.csdn.net/NOVAglow646/article/details/125105580 出现这个问题,说明pip install安装到了另外的某个python的site-packages下。 解 阅读全文
posted @ 2023-02-16 16:39 无左无右 阅读(271) 评论(0) 推荐(0) 编辑
摘要:跑yolov5的DDP记录 一开始是pytorch1.7,python3.7 跑ddp模式训练,各种问题报错。但是后来好像把一个参数不兼容的给注释就好了?但是从机没有打印以为是有问题的? # EarlyStopping if RANK != -1: # if DDP training broadca 阅读全文
posted @ 2023-02-15 11:54 无左无右 阅读(296) 评论(0) 推荐(0) 编辑
摘要:1. 比较好的讲解的链接 [原创][深度][PyTorch] DDP系列第一篇:入门教程 https://zhuanlan.zhihu.com/p/178402798 二 https://zhuanlan.zhihu.com/p/187610959 三 https://zhuanlan.zhihu. 阅读全文
posted @ 2023-02-13 17:28 无左无右 阅读(61) 评论(0) 推荐(0) 编辑
摘要:python 文件太多打不开文件夹,取样少量的文件, 建立同样的文件目录结构 1. 在文件夹旁边新建文件夹 import os import shutil import random root_file = "/media/algo/data_1/everyday/20230203-有大文件/sno 阅读全文
posted @ 2023-02-05 23:54 无左无右 阅读(32) 评论(0) 推荐(0) 编辑
摘要:nohup sh run.sh & tail -f *log 阅读全文
posted @ 2023-02-02 21:52 无左无右 阅读(26) 评论(0) 推荐(0) 编辑
摘要:import os dir_txt = "data/demo/" txt_path_List = [] cnt_2 = 0 g = os.walk(dir_txt) for path, d, filelist in g: for filename in filelist: if filename.e 阅读全文
posted @ 2023-02-02 16:06 无左无右 阅读(71) 评论(0) 推荐(0) 编辑