def save_model(model,file_name): print('保存模型文件到:{}'.format(file_name)) torch.save(model, file_name) print('模型文件保存完毕') # with open(file_name,'wb') as f: # pickle.dump(model,f) def load_model(file_name,device): return torch.load(file_name, map_location=device) # with open(file_name,'rb') as f: # retur...