From 6dedf86de083b1f01d8bca071a825a252294b30d Mon Sep 17 00:00:00 2001 From: ChengZi Date: Fri, 11 Aug 2023 10:58:43 +0800 Subject: [PATCH] fix config type caused by timm version Signed-off-by: ChengZi --- isc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isc.py b/isc.py index a8d89a5..0292e27 100644 --- a/isc.py +++ b/isc.py @@ -128,6 +128,8 @@ class Isc(NNOperator): @property def config(self): config = get_pretrained_cfg(self.timm_backbone) + if hasattr(config, 'to_dict'): + config = config.to_dict() return config def save_model(self, format: str = 'pytorch', path: str = 'default'):