保存加载模型参数
torch.save(the_model.state_dict().PATH)
the_model = TheModelClass(*args,**kwargs)
the_model.load_state_dict(torch.load(PATH))
保存加载整个模型
torch.save(the_model,PATH)
the_model =torch.load(PATH)
保存加载模型参数
torch.save(the_model.state_dict().PATH)
the_model = TheModelClass(*args,**kwargs)
the_model.load_state_dict(torch.load(PATH))
保存加载整个模型
torch.save(the_model,PATH)
the_model =torch.load(PATH)