lucidrains / enformer-pytorch

Implementation of Enformer, Deepmind's attention network for predicting gene expression, in Pytorch
MIT License
434 stars 81 forks source link

How to load the pre-trained Enfromer model? #3

Closed yzJiang9 closed 2 years ago

yzJiang9 commented 2 years ago

Hi, I encountered a problem when trying to load the pre-trained enformer model.

from enformer_pytorch import Enformer model = Enformer.from_pretrained("EleutherAI/enformer-preview")

AttributeError Traceback (most recent call last) Input In [3], in 1 from enformer_pytorch import Enformer ----> 2 model = Enformer.from_pretrained("EleutherAI/enformer-preview")

AttributeError: type object 'Enformer' has no attribute 'from_pretrained'

lucidrains commented 2 years ago

@yzJiang9 hey! if you upgrade to version 0.4, it will be fixed

pip install enformer-pytorch --upgrade

yzJiang9 commented 2 years ago

I will definitely give it a try... I installed the package like one month ago.