Genentech / gReLU

gReLU is a python library to train, interpret, and apply deep learning models to DNA sequences.
https://genentech.github.io/gReLU/
MIT License
225 stars 23 forks source link

Loading custom models #76

Open saninta0212 opened 3 weeks ago

saninta0212 commented 3 weeks ago

Hi all, is there a way for me to load custom models given a path if the model is not present in the model zoo?

avantikalal commented 2 weeks ago

Yes you can use

from grelu.lightning import LightningModel
model = LightningModel.load_from_checkpoint(file)

However, the model checkpoint has to be saved using gReLU. We currently don't have the ability to load arbitrary pytorch models, though we will add more flexibility in this direction soon.