Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The create_model in timm cannot be used #7

Open
ZhanYang-nwpu opened this issue Dec 14, 2024 · 1 comment
Open

The create_model in timm cannot be used #7

ZhanYang-nwpu opened this issue Dec 14, 2024 · 1 comment

Comments

@ZhanYang-nwpu
Copy link

backbone = create_model( model_name= cfg.MODEL.BACKBONE.TYPE, pretrained= pretrained, num_classes=1000,
drop_rate=0.0, drop_path_rate=cfg.TRAIN.DROP_PATH_RATE, drop_block_rate=None, img_size=256
)

报错:
raise RuntimeError('Unknown model (%s)' % model_name)
RuntimeError: Unknown model (vim_small_patch16_224_bimambav2_final_pool_mean_abs_pos_embed_with_midclstok_div2)

timm当中创建模型的名称列表当中不存在(vim_small_patch16_224_bimambav2_final_pool_mean_abs_pos_embed_with_midclstok_div2),请问这个问题应该如何解决呢?谢谢!

@wsasdsda
Copy link
Contributor

backbone = create_model( model_name= cfg.MODEL.BACKBONE.TYPE, pretrained= pretrained, num_classes=1000, drop_rate=0.0, drop_path_rate=cfg.TRAIN.DROP_PATH_RATE, drop_block_rate=None, img_size=256 )

报错: raise RuntimeError('Unknown model (%s)' % model_name) RuntimeError: Unknown model (vim_small_patch16_224_bimambav2_final_pool_mean_abs_pos_embed_with_midclstok_div2)

timm当中创建模型的名称列表当中不存在(vim_small_patch16_224_bimambav2_final_pool_mean_abs_pos_embed_with_midclstok_div2),请问这个问题应该如何解决呢?谢谢!

您好,感谢您的关注!这个bug可能是因为没有把模型的类定义到 init.py文件里?

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

No branches or pull requests

2 participants