
编程基础
IdemoX
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python的数据类型
https://blog.youkuaiyun.com/luanpeng825485697/article/details/78387573转载 2018-10-09 20:10:13 · 115 阅读 · 0 评论 -
Pytorch超出内存
转载自https://ptorch.com/news/160.html一、不要在循环训练中累积历史记录。默认情况下,涉及需要求导/梯度gradients变量的计算将保存在内存中。计算中避免使用这些变量,例如在跟踪统计数据时,这些变量在循环训练中将超出你内存。相反,您应该分离变量或访问其基础数据。有时,当可微分变量可能发生时,它可能并不明显。考虑以下循环训练(从源代码删减):total_lo...转载 2018-12-02 09:54:22 · 10466 阅读 · 0 评论 -
Pytorch指定特定GPU运行
转载于:http://www.cnblogs.com/darkknightzh/p/6836568.htmlPyTorch默认使用从0开始的GPU,如果GPU0正在运行程序,需要指定其他GPU。有如下两种方法来指定需要使用的GPU。类似tensorflow指定GPU的方式,使用CUDA_VISIBLE_DEVICES。1.1 直接终端中设定:CUDA_VISIBLE_DEVICES=...转载 2018-12-02 11:48:17 · 1515 阅读 · 0 评论 -
各版本Pytorch安装详解
Pytorch安装教程windows版本conda安装1.cuda9.0 python3.6/3.5/3.7conda install pytorch -c pytorchpip3 install torchvision2.cuda8.0 python3.6/3.5/3.7conda install pytorch cuda80 -c pytorchpip3 install to...原创 2018-11-30 15:06:35 · 29733 阅读 · 7 评论 -
pytorch动态调整学习率
转载自:http://spytensor.com/index.php/archives/32/自定义根据 epoch 改变学习率。这种方法在开源代码中常见,此处引用 pytorch 官方实例中的代码 adjust_lrdef adjust_learning_rate(optimizer, epoch): """Sets the learning rate to the initial ...转载 2018-12-03 15:24:40 · 11812 阅读 · 2 评论