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

OWlVit: KeyError: 'ln_2' #1127

Open
yangt1013 opened this issue Oct 23, 2024 · 1 comment
Open

OWlVit: KeyError: 'ln_2' #1127

yangt1013 opened this issue Oct 23, 2024 · 1 comment

Comments

@yangt1013
Copy link

Hi, author, I met some issues with evaluator stage.
When I training and testing as followings, there are some weird in model file.

Traceback (most recent call last):
File "/home/yangt/miniconda3/envs/pytorch/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/yangt/miniconda3/envs/pytorch/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/ssd1/yangt/FG-OVD/scenic/scenic/projects/owl_vit/evaluator.py", line 741, in
app.run(main)
File "/home/yangt/.local/lib/python3.10/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/home/yangt/.local/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "/ssd1/yangt/FG-OVD/scenic/scenic/projects/owl_vit/evaluator.py", line 698, in main
predictions = get_predictions(
File "/ssd1/yangt/FG-OVD/scenic/scenic/projects/owl_vit/evaluator.py", line 420, in get_predictions
variables = module.load_variables(checkpoint_path=checkpoint_path)
File "/ssd1/yangt/FG-OVD/scenic/scenic/projects/owl_vit/models.py", line 122, in load_variables
params = _fix_old_checkpoints(params)
File "/ssd1/yangt/FG-OVD/scenic/scenic/projects/owl_vit/models.py", line 73, in _fix_old_checkpoints
params['backbone']['clip']['visual']['transformer'] = _fix_old_layernorm(
File "/ssd1/yangt/FG-OVD/scenic/scenic/projects/owl_vit/models.py", line 49, in _fix_old_layernorm
resblock['ln_1'] = resblock.pop('ln_2')
KeyError: 'ln_2'

How can I revise it?

@Torpedo2648
Copy link

The same question! Have you fixed it? #

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