
PyTorch
DJames23
这个作者很懒,什么都没留下…
展开
-
【YOLOv3】训练新数据集记录
参考代码:https://github.com/eriklindernoren/PyTorch-YOLOv31.训练时loss出现nan原因:默认学习率learning_rate=0.001过大导致梯度爆炸,出现inf与nan值解决办法:在yolov3.cfg中降低学习率:参考博客:网络训练时出现loss为nan的情况(已解决)神经网络训练时,出现NaN loss...原创 2020-11-05 15:23:47 · 825 阅读 · 0 评论 -
安装pytorch时InvalidArchiveError
报错:InvalidArchiveError("Error with archive /anaconda3/pkgs/pytorch-1.2.0-py3.7_cuda10.0.130_cudnn7.6.2_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open '/anaconda3/pkgs/pytorch原创 2020-11-05 13:02:54 · 7123 阅读 · 1 评论 -
torch.t()、torch.min()、*、torch.stack、.long()
yolov3中的bbox_wh_iou代码如下:def bbox_wh_iou(wh1, wh2): wh2 = wh2.t() # w1是当前anchor的w,h1是当前anchor的h w1, h1 = wh1[0], wh1[1] # w2是所有目标的w,h2是所有目标的h w2, h2 = wh2[0], wh2[1] inter_area = torch.min(w1, w2) * torch.min(h1, h2) union_area原创 2020-11-04 15:36:13 · 1306 阅读 · 0 评论 -
Pytorch中的tensor[...,0]
参考博客:PyTorch中[…, 0]的使用pytorch中[…, 0]的用法>>> a= torch.rand(1,2,2,2,2)>>> atensor([[[[[0.2528, 0.9359], [0.1876, 0.4189]], [[0.5546, 0.1931], [0.1389, 0.7482]]], [[[0.6169, 0.2977],原创 2020-11-03 22:16:46 · 1697 阅读 · 0 评论 -
【CV】DLA-深层聚合网络
DLA网络详解CenterNet的骨干网络之DLASeg原创 2020-08-06 09:45:36 · 1452 阅读 · 0 评论 -
【CV】yolov3 RuntimeError: CUDA error: device-side assert triggered
RuntimeError: CUDA error: device-side assert triggered/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:60: lambda [](int)->auto::operator()(int)->auto: block: [0,0,0], thread: [2,0,0] Assertion `index >= -sizes[i] && index < sizes[i]原创 2020-07-29 10:09:48 · 2526 阅读 · 0 评论 -
创建PyTorch虚拟环境
conda create -n 虚拟环境名称(这一步可以指定python版本)conda activate虚拟环境名称conda install pytorch1.2.0 torchvision0.4.0 cudatoolkit=10.0 -c pytorch(这一步指定pytorch版本为1.2.0,torchvision0.4.0,CUDA10.0)以FairMOT为例:conda create -n FairMOT python=3.7conda activate FairMOTconda原创 2020-05-11 10:10:40 · 874 阅读 · 0 评论 -
PyTorch中tensor.eq()和tensor.lt()
在PyTorch中Tensor的查找和筛选例子>>> x = torch.arange(5) >>> xtensor([0, 1, 2, 3, 4])>>> torch.gt(x,1) # 大于tensor([0, 0, 1, 1, 1], dtype=torch.uint8)>>> x>1 # 大于...原创 2020-04-29 19:43:36 · 8511 阅读 · 0 评论