
pytorch
文章平均质量分 62
orzchenyuming
曾梦想仗剑走天涯,后来工作忙没有去
展开
-
Jetson tx2(JetPack 4.4)配置pytorch环境
下载pytorch下载pytorch1.7:我的系统是JetPack4.4,要求pytorch>=1.7.安装pytorchsudo apt-get install libopenblas-base libopenmpi-devpip3 install torch-1.7.0-cp36-cp36m-linux_aarch64.whl安装torchvision这里选择torchvision 0.8.1(可根据自己的pytorch选择torchvision版本)sudo apt-原创 2021-07-28 09:09:41 · 821 阅读 · 0 评论 -
mmdetection训练自己的数据
配置环境安装pytorch环境安装mmcvgit clone https://github.com/open-mmlab/mmcv.gitcd mmcvpip install .(是的你没看错,这里就是有个 . )安装mmdetectiongit clone https://github.com/open-mmlab/mmdetection.gitcd mmdetectionpython setup.py develop安装完成训练自己的数据(如cascade rcnn)原创 2021-07-14 13:08:55 · 563 阅读 · 0 评论 -
pytorch转onnx,onnx转tensorrt(onnx-tensorrt)【基础版】
依照onnx-tensorrt官方步骤下载到本地本人下载的对应tensorrt6.0.x.x的版本git clone -b 6.0 --single-branch https://github.com/onnx/onnx-tensorrt.gitgit submodule initgit submodule update #更新子模块cd onnx-tensorrtmkdir buildcmake .. -DTENSORRT_ROOT=<tensorrt_install_dir>原创 2021-03-16 11:24:40 · 1902 阅读 · 0 评论 -
Faster RCNN pytroch训练问题:Warning: NaN or Inf found in input tensor.
problem在自己的数据(voc格式)上训练Faster RCNN(https://github.com/jwyang/faster-rcnn.pytorch)就出现了loss=nan的问题。在Pascal voc和coco上训练Faster RCNN都正常。reason可能是learning rate太大,调小learning rate。最有效的方法是learning rate设为0,看看是不是还有nan的问题。大概率是自己的数据有问题(我的数据是voc格式),voc获取左边后是要减1的原创 2020-12-18 16:36:20 · 8177 阅读 · 3 评论 -
pytorch 牺牲计算速度减少显存使用量
牺牲计算速度减少显存使用量https://oldpan.me/archives/how-to-use-memory-pytorch原创 2019-03-06 10:22:03 · 416 阅读 · 0 评论 -
Pytorch 细节记录:初始化方法......
https://www.cnblogs.com/king-lps/p/8570021.html原创 2019-01-15 15:32:32 · 681 阅读 · 0 评论 -
requires_grad和volatile
每个Tensor都有两个标志:requires_grad和volatile。它们都允许从梯度计算中精细地排除子图,并可以提高效率。requires_grad如果有一个单一的输入操作需要梯度,它的输出也需要梯度。相反,只有所有输入都不需要梯度,输出才不需要。如果其中所有的变量都不需要梯度进行,后向计算不会在子图中执行。x = Variable(torch.randn(5, 5))y = V...原创 2018-11-08 16:23:21 · 1737 阅读 · 0 评论 -
Ubuntu16安装Nivdia独立显卡驱动和分辨率配置
#### 1.从附加驱动选项中选择最新的显卡驱动,应用改变。 安装成功之后重启系统。 #### 2。在搜索菜单搜索Nvidia ,打开英伟达配置程序NVIDIA X Server Settings。如果没有屏幕对应的分辨率,随意选择一个分辨率和刷新频率,并单击按钮Save to X configration file,保存当前配置。注意保存路径为/etc/X11/xorg....原创 2018-04-18 15:54:23 · 720 阅读 · 0 评论 -
Ubuntu命令行分屏神器:tmux
安装1.1 直接安装sudo apt-get install tmux可以直接用上面命令安装,不同的系统安装的版本不同,14.04对应 tmux 1.8;16.04对应 tmux 2.1。因为后面安装插件,要求tmux&amp;gt;=2.1, 所以ubuntu 14.04的朋友请选择后面的安装方式(16.04的小伙伴随意)。1.2 tar.gz 安装从 https://github.c...原创 2018-09-28 12:05:36 · 2479 阅读 · 1 评论 -
Pytorch: AlexNet在不同的layer使用不同的learning rate
对于一个network:class AlexNet(nn.Module):def __init__(self, num_classes=1000): super(AlexNet, self).__init__() self.features = nn.Sequential( nn.Conv2d(3, 64, kernel_size=11, stride=4, p...原创 2018-09-27 15:56:14 · 422 阅读 · 0 评论 -
pytorch余弦退火,learning rate 衰减
lr_scheduler = optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=5,eta_min=4e-08)lr_scheduler.step()官网:https://pytorch.org/docs/0.3.1/optim.html#torch.optim.lr_scheduler.CosineAnnealingLRExampl...原创 2018-09-18 12:36:42 · 17231 阅读 · 0 评论