📜  pytorch dill 模型保存 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:39.202000             🧑  作者: Mango

代码示例1
import dill

model_copy=dill.dumps(model)
torch.save(model_copy,‘model_ignite_original.pt’)

model1 = torch.load(model_name)
model=dill.loads(model1)