06 2021 档案
摘要:在pytorch多卡训练得到的pth.tar形式的checkpoint中一个问题是key都被加上了module,例如原来的'fc.weight'就变成了'module.fc.weight',在加载进单卡下的模型时如果命令为model.load_state_dict(state_dict, stric
阅读全文
摘要:记录一个pytorch多卡训练遇到的bug 报错如下: RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.
阅读全文