COSA
COSA copied to clipboard
ERROR when running testing
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
I also tried different version of torch, got other errors
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
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
How did you solve that problems? Could you please offer some code or command?
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.