摘要:
跑yolov5的DDP记录 一开始是pytorch1.7,python3.7 跑ddp模式训练,各种问题报错。但是后来好像把一个参数不兼容的给注释就好了?但是从机没有打印以为是有问题的? # EarlyStopping if RANK != -1: # if DDP training broadca 阅读全文
摘要:
1. 比较好的讲解的链接 [原创][深度][PyTorch] DDP系列第一篇:入门教程 https://zhuanlan.zhihu.com/p/178402798 二 https://zhuanlan.zhihu.com/p/187610959 三 https://zhuanlan.zhihu. 阅读全文
摘要:
python 文件太多打不开文件夹,取样少量的文件, 建立同样的文件目录结构 1. 在文件夹旁边新建文件夹 import os import shutil import random root_file = "/media/algo/data_1/everyday/20230203-有大文件/sno 阅读全文
摘要:
nohup sh run.sh & tail -f *log 阅读全文
摘要:
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 阅读全文
摘要:
import numpy as np predict = np.random.rand(7, 3) gt = np.random.randint(0, 3, (7, 1)) # [[0.86111937 0.17885014 0.15346783] # [0.18914942 0.55776159 阅读全文
摘要:
mount -t cifs //192.168.1.23/data path_local -o username=nihao,password=2023 阅读全文
摘要:
pytorch的torchvision.ops.roi_align这个算子真的是坑我好多天啊!害我连续加班半个月!二阶段目标检测后面用roi_align来提取特征。 接口官方说明: https://pytorch.org/vision/stable/generated/torchvision.ops 阅读全文
摘要:
#python 读取文本: ##方法1: with open(txt_path, "r") as fr: lines = fr.readlines() for line in lines: line = line.strip() #去除换行符 \n ##方法2: f = open("tmp2.txt 阅读全文
摘要:
import time str_time_now = time.strftime("%Y-%m-%d_%H:%M:%S", time.localtime()) ##2023-01-10_09:58:33 2023-01-10_09:58:33 用str_time_now可以很方便的嵌入到文件名中,方 阅读全文