havakv / pycox

Survival analysis with PyTorch
BSD 2-Clause "Simplified" License
803 stars 188 forks source link

PicklingError while trying to save the model #74

Closed SaraAlthubaiti closed 2 years ago

SaraAlthubaiti commented 3 years ago

Hi all,

I used CoxPH and at the end when trying to save the trained model with save_net like that model.save_net('data_root/model'), I get this error:

PicklingError: Can't pickle <class 'torch._C._VariableFunctions'>: it's not the same object as torch._C._VariableFunctions

Any help with that, please?

havakv commented 3 years ago

Hi! I'm not sure what this error might come from. For debugging could you provide the following details?