pytorch 分布式多卡并行训练模型 发表于 2020-03-24 | 分类于 pytorch | 字数统计 532 | 阅读时长 2 pytorch 单机多卡训练模型修改代码现在大部分github支持分布式训练,如果不支持需要做一下更改 需要加入参数–local_rank 1parser.add_argument("--local_rank", type=int, default=0) 使用local_rank初始化设备 123d ... 阅读全文 »
pytorch走过的坑 发表于 2019-10-06 | 分类于 pytorch | 字数统计 52 | 阅读时长 1 记录一下学习pytorch遇到的两大坑 zero_grad 需要收到清空历史梯度 torch.nn.CrossEntropyLoss 不用加入激活层softmax,在运算时已经加入了,如果加入softmax用nnl损失 阅读全文 »
git_tree 发表于 2019-09-24 | 分类于 git | 字数统计 128 | 阅读时长 1 DownGit链接:https://www.itsvse.com/downgit/ 现在有一个test仓库https://github.com/mygithub/test你要gitclone里面的tt子目录:在本地的硬盘位置打开Git Bash 12345678git init test & ... 阅读全文 »
leecode24 发表于 2019-06-03 | 分类于 leecode | 字数统计 69 | 阅读时长 1 1234567891011121314151617181920212223242526272829class Solution: def swapPairs(self, head: ListNode) -> ListNode: newhead = List ... 阅读全文 »
leecode718 发表于 2019-06-03 | 分类于 leecode | 字数统计 118 | 阅读时长 1 比较简单的动态规划,自己能找到状态转换关系的第一道动态规划题 12345678910111213141516171819class Solution: def findLength(self, A: List[int], B: List[int]) -> int: a_l ... 阅读全文 »
python_tqdm 发表于 2019-05-27 | 分类于 python | 字数统计 19 | 阅读时长 1 进度条使用https://www.jianshu.com/p/21cf48be6bf6 https://blog.csdn.net/zkp_987/article/details/81748098 阅读全文 »
leecode/math50 发表于 2019-05-24 | 分类于 leecode | 字数统计 69 | 阅读时长 1 123456789101112131415161718class Solution: def myPow(self, x: float, n: int) -> float: if n == 0: return 1 if n > 0 ... 阅读全文 »
训练技巧总结 发表于 2019-05-15 | 分类于 deeplearn | 字数统计 179 | 阅读时长 1 数据处理 数据归一化。 随机乱序,在最后抖动的时候,会很稳定 数据增强器,对于数据少的情况,尤为重要。 图像数据增强器的使用 模型 加Batch Normalization, 加Batch Normalization很管用,尤其是数据没有归一化的时候。 dropout一定程度可以防止过拟合 优化 ... 阅读全文 »
easy_install--打脸python爱好者 发表于 2019-05-13 | 分类于 python | 字数统计 152 | 阅读时长 1 easy_install的使用作为python爱好者,竟然不知道有easy_install 的存在,简直是打脸。习惯使用pip或者conda,从来没注意过easy_install的存在。 可能大家都遇到过一个同样的问题,pip更新失败。这是一个非常让人恶心的问题,曾一度因为pip更新失败重装pyth ... 阅读全文 »