Update basemodel.py

fix #38
This commit is contained in:
DingDing 2022-10-28 15:17:18 +08:00 committed by GitHub
parent f7d1912767
commit 42a798d26a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,8 @@ class DeltaBase(nn.Module, SaveLoadMixin):
self.structure_mapping = None self.structure_mapping = None
if unfrozen_modules is None: if unfrozen_modules is None:
self.unfrozen_modules = self.default_unfrozen_modules self.unfrozen_modules = self.default_unfrozen_modules
else:
self.unfrozen_modules = unfrozen_modules
if self.common_structure and self.structure_mapping is None: if self.common_structure and self.structure_mapping is None:
raise RuntimeError("Using common structure but the structure mapping is None") raise RuntimeError("Using common structure but the structure mapping is None")
if backend not in self._supported_backends: if backend not in self._supported_backends: