Skip to content

(Issue #69) Modified from_checkpoint method - #70

Merged
ChrisNick92 merged 1 commit into
mainfrom
69-modify-from_checkpoint-method-to-not-download-the-pretrained-backbone-if-this-set-to-true
Jun 8, 2026
Merged

(Issue #69) Modified from_checkpoint method#70
ChrisNick92 merged 1 commit into
mainfrom
69-modify-from_checkpoint-method-to-not-download-the-pretrained-backbone-if-this-set-to-true

Conversation

@stefanos-vlachos

Copy link
Copy Markdown
Collaborator

@ChrisNick92

PR Summary

In this PR, all from_checkpoint() methods were modified so weights of pre-trained backbones are not initialized twice.

Changes

  • constructors.py:
    • BackboneConstructor.from_checkpoint(): pretrained is now ovewritten to False
    • AudioClassifierConstructor.from_checkpoint(): pretrained is also ovewritten to False
    • BackbonePoolingResolverMixin._resolve_backbone(): strict=False was added to model.load_state_dict(ckpt) to avoid error caused by additional classifier weights present in the pre-trained MobileNet checkpoint.
Στιγμιότυπο οθόνης 2026-06-08 093716

Checklist

  • Formatted code with Ruff
  • Deleted cached data and tested model initialization from checkpoint. Everything works fine.
  • Performed successfully all tests.

@ChrisNick92 ChrisNick92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok Stef it looks good only by looking the code. I'll merge on main and I review end-to-end in PR #72 .

@ChrisNick92
ChrisNick92 merged commit 91e2933 into main Jun 8, 2026
0 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

modify from_checkpoint method to not download the pretrained backbone if this set to true

2 participants