
pytorch
文章平均质量分 65
j-o-l-i-n
半路出家机房扫地僧,沉迷火炉炼丹和修仙。精通徒手写bug,曾出版《如何一秒爆显存》。
展开
-
pytorch DistributedDataParallel提示未参与loss计算的变量错误
错误提示:RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by (1) passing原创 2021-01-29 22:20:21 · 12846 阅读 · 2 评论 -
AttributeError: 'DistributedDataParallel' object has no attribute 'blahblah'
Pytorch DDP would fail when using the parameters directly to calculate the loss.These are my scripts:# train.py:class Model(nn.Module): def __init__(self, params): ... self.xnli_proj = nn.Linear(dim, 3)...model = Model(params)output = model.x原创 2020-05-12 00:06:19 · 4129 阅读 · 1 评论 -
DataLoader, when num_worker >0, there is bug
Since PyTorch seems to adopt lazy way of initializing workers, this means that the actual file opening has to happen inside of thegetitemfunction of the Dataset wrapper.https://discuss.pytorch.org...原创 2020-01-14 12:04:01 · 260 阅读 · 0 评论 -
Why I can't reproduce my results
1. Pytorch's CPU's and GPU's seeds are independent. So set/save/load them independentlyhttps://discuss.pytorch.org/t/are-gpu-and-cpu-random-seeds-independent/1422. If you use randomness on several...原创 2019-02-16 13:51:49 · 227 阅读 · 0 评论