enforce fail at inline_container.cc:222

执行 torch.load 时出现错误:

“RuntimeError: [enforce fail at inline_container.cc:222] . file not found: archive/data/94479765723472”

或者

“RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading file data/94100453134480: invalid header or archive is corrupted”

原因:

pth文件有问题。多卡训练,保存模型时,只能让一张卡保存,否则 pth文件会乱。

你可能感兴趣的:(模式识别,编程,torch.load,pytorch)