Skip to content

KeyError: '0.encoder.weight' when running classification task #7

@LunaBaozi

Description

@LunaBaozi

Good morning, thanks for the interesting work!
Could you please provide a more detailed explanation as to how a pretrained network can be used for a classification task?

As far as I understood, a user should download at least the ChEMBL_1M_atom models folder and put it into a parent folder inside the project. Then, notebook 05_Pretrained_Models.ipynb should be run entirely. Ultimately, the user can skip the finetuning procedure present in notebook 02_MSPM_TS_finetuning.ipynb and jump directly to running notebook 03_QSAR_Classifcation.ipynb.

I am having troubles running the code present in notebook 03_QSAR_Classifcation.ipynb.
Specifically, I keep getting the following error when running
lm_learner = lm_learner.load_pretrained(*fnames):
KeyError: '0.encoder.weight'.

Even when running the code as-is on a fresh clone on Google Colab without any modification, I cannot get rid of this error.
I only installed RDKit and FastAI (v. 1.0.61) to make the code run.

Thank you in advance for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions