longlongman / CasRel-pytorch-reimplement

Pytorch reimplement of the paper "A Novel Cascade Binary Tagging Framework for Relational Triple Extraction" ACL2020. The original code is written in keras.
200 stars 53 forks source link

framework.py中为什么保存ori_model而不是model #9

Open senseandcalm opened 3 years ago

senseandcalm commented 3 years ago

framework.py第120行,保存的是ori_model而不是model? ori_model不是最原始的模型么?

longlongman commented 3 years ago

因为你可以用多卡训练,多卡训练的情况下model是多卡,因为我不想保存多卡的模型,所以保存的是ori_model,两者在单卡训练时是一致的,多卡模型的保存与加载可以参考https://my.oschina.net/u/4279077/blog/3366893