Describe the bug
if the architecture or teacher of SingleTeacherDistill is a instance of TimmClassifier, the ckpt can not be load correctly.
To Reproduce
from mmengine.config import Config
from mmrazor.registry import MODELS
from mmengine.runner import load_checkpoint, save_checkpoint
model = MODELS.build(Config.fromfile('./debug_config.py')['model'])
save_checkpoint(model.state_dict(), './temp.pth')
load_checkpoint(model, './temp.pth', strict=True)
Config
student = dict(
_scope_='mmcls',
type='TimmClassifier',
model_name='deit_tiny_patch16_224',
)
teacher = dict(
_scope_='mmcls',
type='TimmClassifier',
model_name='cait_s24_224',
)
model = dict(
_scope_='mmrazor',
type='SingleTeacherDistill',
architecture=student,
teacher=teacher,
distiller=dict(
type='ConfigurableDistiller',
),
)
Describe the bug
if the architecture or teacher of
SingleTeacherDistillis a instance ofTimmClassifier, the ckpt can not be load correctly.To Reproduce
Config