MannLabs / alphapeptdeep

Deep learning framework for proteomics
Apache License 2.0
109 stars 20 forks source link

Finetune a pretrained model on a new dataset without using mode_x to optimize performance for the new target. #199

Open shamimshahcheraghi opened 1 month ago

shamimshahcheraghi commented 1 month ago

I want to use a pretrained model that excludes mod_x, but I can't locate the .pth file in the standard pretrained folder.

model = model = ModelInterface_for_Generic_AASeq_Regression( model_class=Model_for_Generic_AASeq_Regression_LSTM ) model.load('pretrained_models.zip', model_path_in_zip='generic/rt.pth')

jalew188 commented 1 month ago

Please use peptdeep.pretrained_models.ModelManager, it has a pre-trained rt_model attr.

Then, if you don't need mod_x, please use:

df["mods_bak"] = df["mods"]
df["mod_sites_bak"] = df["mod_sites"]
df["mods"] = ""
df["mod_sites"] = ""

Do whatever you want