lucidrains / enformer-pytorch

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

Add base_model_prefix #4

Closed NielsRogge closed 2 years ago

NielsRogge commented 2 years ago

This PR fixes the from_pretrained method by adding base_model_prefix, as this makes sure weights are properly loaded from the hub.

Kudos to @sgugger for finding the bug.

sgugger commented 2 years ago

Note that we're also fixing Transformers to work without this (in this PR) but the fix won't be out until the next release, so this makes sure Enformer works in the meantime.

lucidrains commented 2 years ago

@sgugger @NielsRogge thank you for the swift de- :fly: -ing! and congrats on releasing a great feature :)