
pytorch
ASR_THU
研究方向:语音处理
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[pytorch] 在pytorch中实现与TensorFlow类似的same方式padding
转载自https://oldpan.me/archives/pytorch-same-padding-tflike 前言 TensorFlow中在使用卷积层函数的时候有一个参数padding可以选择same或者vaild,具体可以看之前的这篇文章:https://oldpan.me/archives/tf-keras-padding-vaild-same.而在pytorch中,现在的版本...转载 2019-05-06 17:22:22 · 3478 阅读 · 0 评论 -
[pytorch] 每次训练的结果都不同(无法复现)
原因: 没有设置seed,torch的一些操作有随机性。 解决:https://github.com/pytorch/pytorch/issues/7068 torch.manual_seed(seed) torch.cuda.manual_seed(seed) torch.cuda.manual_seed_all(seed) # if you are using ...原创 2019-06-05 18:11:56 · 13185 阅读 · 1 评论 -
[pytorch] 名词理解
in - place operation https://discuss.pytorch.org/t/what-is-in-place-operation/16244 https://zhuanlan.zhihu.com/p/38475183 An in-place operation is an operation that changes directly the content of...原创 2019-06-10 17:25:10 · 340 阅读 · 0 评论 -
[pytorch] 运行一段时间后 GPU OOM
pytorch的dataloader会将数据传到GPU上,这个过程GPU的mem占用会逐渐增加,为了避免GPUmen被无用的数据占用,可以在每个step后用del删除一些变量,也可以使用torch.cuda.empty_cache()释放显存: del targets, input_k, input_mask torch.cuda.empty_cache() 这时能观察到GPU的显存一直在动...原创 2019-08-06 19:08:50 · 4046 阅读 · 1 评论 -
[pytorch] freeze parameters in sub model
https://discuss.pytorch.org/t/how-the-pytorch-freeze-network-in-some-layers-only-the-rest-of-the-training/7088原创 2019-08-09 09:27:01 · 812 阅读 · 0 评论