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

加载EfficientNet模型报错“unexpected EOF” #112

Closed
hao-xiaoxing opened this issue Apr 18, 2023 · 0 comments
Closed

加载EfficientNet模型报错“unexpected EOF” #112

hao-xiaoxing opened this issue Apr 18, 2023 · 0 comments

Comments

@hao-xiaoxing
Copy link

File "main_persformer.py", line 44, in
main()
File "main_persformer.py", line 38, in main
runner.train()
File "/mnt/data/HXX/PersFormer_3DLane/experiments/runner.py", line 114, in train
model, optimizer, scheduler, best_epoch, lowest_loss, best_f1_epoch, best_val_f1 = self._get_model_ddp()
File "/mnt/data/HXX/PersFormer_3DLane/experiments/runner.py", line 744, in _get_model_ddp
model = PersFormer(args)
File "/mnt/data/HXX/PersFormer_3DLane/models/PersFormer.py", line 49, in init
self.encoder = self.get_encoder(args)
File "/mnt/data/HXX/PersFormer_3DLane/models/PersFormer.py", line 207, in get_encoder
return deepFeatureExtractor_EfficientNet(args.encoder, lv6=False, lv5=False, lv4=False, lv3=False)
File "/mnt/data/HXX/PersFormer_3DLane/models/networks/feature_extractor.py", line 410, in init
self.encoder = geffnet.tf_efficientnet_b7_ns(pretrained=True)
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/geffnet/gen_efficientnet.py", line 1246, in tf_efficientnet_b7_ns
model = _gen_efficientnet(
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/geffnet/gen_efficientnet.py", line 544, in _gen_efficientnet
model = _create_model(model_kwargs, variant, pretrained)
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/geffnet/gen_efficientnet.py", line 290, in _create_model
load_pretrained(model, model_urls[variant])
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/geffnet/helpers.py", line 39, in load_pretrained
state_dict = load_state_dict_from_url(url, progress=False, map_location='cpu')
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/torch/hub.py", line 528, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/torch/serialization.py", line 779, in _legacy_load
deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
RuntimeError: unexpected EOF, expected 860436 more bytes. The file might be corrupted.
Killing subprocess 994
Traceback (most recent call last):
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/torch/distributed/launch.py", line 340, in
main()
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/torch/distributed/launch.py", line 326, in main
sigkill_handler(signal.SIGTERM, None) # not coming back
File "/home/user/anaconda3/envs/pers_hxx/lib/python3.8/site-packages/torch/distributed/launch.py", line 301, in sigkill_handler
raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd)
subprocess.CalledProcessError: Command '['/home/user/anaconda3/envs/pers_hxx/bin/python', '-u', 'main_persformer.py', '--local_rank=0', '--mod=persformer', '--batch_size=6', '--nepochs=20']' returned non-zero exit status 1.

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

1 participant