Skip to content

ERROR when running testing #1

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

Open
jmlongriver12 opened this issue Jul 25, 2023 · 3 comments
Open

ERROR when running testing #1

jmlongriver12 opened this issue Jul 25, 2023 · 3 comments

Comments

@jmlongriver12
Copy link

Here is the information:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/conda/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "COSA/env/lib/python3.8/site-packages/torch/init.py", line 527, in
class DoubleStorage(_C.DoubleStorageBase, _StorageBase):
AttributeError: module 'torch._C' has no attribute 'DoubleStorageBase'

I also tried different version of torch, got other errors

@jmlongriver12
Copy link
Author

Now the problem was solved by udpated it to 1.13, but I got another error as:

Traceback (most recent call last):
File "./train.py", line 87, in
main(args, input_args)
File "./train.py", line 58, in main
model = COSA.from_pretrained(opts,checkpoint)
File "/work//COSA/model/modeling.py", line 99, in from_pretrained
model = cls(opts, *inputs, **kwargs)
File "/work//COSA/model/pretrain.py", line 83, in init
super().init(opts)
File "/work//COSA/model/modeling.py", line 181, in init
self.load_swin_model(config)
File "/work//COSA/model/modeling.py", line 316, in load_swin_model
swin_config = get_config('./pretrained_weights/SWIN/swin_base_patch4_window7_224_22k.yaml')
File "/work//COSA/model/swin_config.py", line 350, in get_config
update_config(config,config_file)
File "/work//COSA/model/swin_config.py", line 280, in update_config
_update_config_from_file(config, config_file)
File "/work//COSA/model/swin_config.py", line 266, in _update_config_from_file
with open(cfg_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: './pretrained_weights/SWIN/swin_base_patch4_window7_224_22k.yaml'

The file is not in the pretrained_weights that I downloaded from the link

@sleipnier
Copy link

How did you solve that problems? Could you please offer some code or command?

@TXH-mercury
Copy link
Owner

Now the problem was solved by udpated it to 1.13, but I got another error as:

Traceback (most recent call last): File "./train.py", line 87, in main(args, input_args) File "./train.py", line 58, in main model = COSA.from_pretrained(opts,checkpoint) File "/work//COSA/model/modeling.py", line 99, in from_pretrained model = cls(opts, *inputs, **kwargs) File "/work//COSA/model/pretrain.py", line 83, in init super().init(opts) File "/work//COSA/model/modeling.py", line 181, in init self.load_swin_model(config) File "/work//COSA/model/modeling.py", line 316, in load_swin_model swin_config = get_config('./pretrained_weights/SWIN/swin_base_patch4_window7_224_22k.yaml') File "/work//COSA/model/swin_config.py", line 350, in get_config update_config(config,config_file) File "/work//COSA/model/swin_config.py", line 280, in update_config _update_config_from_file(config, config_file) File "/work//COSA/model/swin_config.py", line 266, in _update_config_from_file with open(cfg_file, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: './pretrained_weights/SWIN/swin_base_patch4_window7_224_22k.yaml'

The file is not in the pretrained_weights that I downloaded from the link

Sorry for the incomplete files. A full pretrained_weights file have been updated now.

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

3 participants