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

missing iformer_small #22

Open
sullivantee opened this issue Jun 3, 2023 · 7 comments
Open

missing iformer_small #22

sullivantee opened this issue Jun 3, 2023 · 7 comments

Comments

@sullivantee
Copy link

sullivantee commented Jun 3, 2023

when running valid.py it shows this error
Traceback (most recent call last):
File "validate.py", line 371, in
main()
File "validate.py", line 358, in main
validate(args)
File "validate.py", line 156, in validate
model = create_model(
File "C:\Users\CHU001\anaconda3\envs\pytorch\lib\site-packages\timm\models\factory.py", line 71, in create_model
raise RuntimeError('Unknown model (%s)' % model_name)
RuntimeError: Unknown model (iformer_small)

the code i ran:
python validate.py ./imagenet --model iformer_small --checkpoint checkpoint/iformer_small/model_best.pth.tar

i found out it grabs the model "iformer_small" from the directory of anaconda3\envs\pytorch\lib\site-packages\timm\models
but there seems to be no such model as "iformer_small"

@shangshang0912
Copy link

shangshang0912 commented Jun 3, 2023 via email

@aulaywang
Copy link

我也有同样的问题,当我在运行finetune或者validation时显示RuntimeError: Unknown model (iformer_small)

@shangshang0912
Copy link

shangshang0912 commented Aug 9, 2023 via email

@ArptPlank
Copy link

我也是遇到了这个问题,我运行finetune时显示没有这个模型RuntimeError: Unknown model (iformer_small)

@shangshang0912
Copy link

shangshang0912 commented Dec 21, 2023 via email

@TCK2001
Copy link

TCK2001 commented Apr 20, 2024

@sullivantee @aulaywang @ArptPlank

  • Step 1
    Add this line from models.inception_transformer import * at the top of validate.py.
  • Step 2
    Uncomment the code below and replace it with the following code:

create model

model = create_model(
    args.model,
    pretrained=args.pretrained,
    num_classes=args.num_classes,
    in_chans=3,
    global_pool=args.gp,
    scriptable=args.torchscript,
    mem_index=args.mem_idx,
    K=args.K)

replace to ....
model = iformer_small(pretrained="./checkpoint/iformer_small/model_best.pth")

@shangshang0912
Copy link

shangshang0912 commented Apr 20, 2024 via email

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

5 participants