yoon307 / CTI

Official code for Class Tokens Infusion for Weakly Supervised Semantic Segmentation, CVPR2024
10 stars 0 forks source link

It seems that there are some bug with the code #4

Open Italy2006 opened 1 month ago

Italy2006 commented 1 month ago

Start experiment cti!
Train dataset is loaded from ./voc12/train_aug.txt
Validation dataset is loaded from ./voc12/train.txt
Traceback (most recent call last):
File "/home/dancer/WeakSupervision/CTI/train_trm.py", line 229, in
model = getattr(importlib.importmodule('models.model'+args.model), 'model_WSSS')(args, logger)
File "/home/dancer/WeakSupervision/CTI/models/model_CTI.py", line 151, in init
self.net_trm = create_model(
File "/home/dancer/anaconda3/envs/ddpm/lib/python3.9/site-packages/timm/models/factory.py", line 71, in create_model
model = create_fn(pretrained=pretrained, pretrained_cfg=pretrained_cfg, *kwargs)
File "/home/dancer/WeakSupervision/CTI/networks/mctformer.py", line 271, in deit_small_MCTformerV2_CTI
model = MCTformerV2_CTI(
File "/home/dancer/WeakSupervision/CTI/networks/mctformer.py", line 103, in init
super().init(
args, **kwargs)
TypeError: init() got an unexpected keyword argument 'pretrained_cfg'

yoon307 commented 1 month ago

Hi, this error seems to be the pytorch version issue and you can modify the "pretrained_cfg" by setting to None in your pytorch library. This will handle the issue.