-
Notifications
You must be signed in to change notification settings - Fork 60
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
ran out of input #21
Comments
Hi, Yanzhao, this error is related to 'run_tasks('./config.yml')', do you have any suggestions about this error? @ZhouYanzhao |
Hi, @ZhouYanzhao , 59 config[key] = parse_config( It seems that the error happens at line 60 in parser.py file of the nest package. However, I can not figure out the reason as I am not familiar with the iteration operation in this file. looking forward to your suggestions. Thanks, |
I fixed the bug by changing the python and pytorch version. While the basic problem is that the code can find the file path but cannot load the file. Sorry for bothering. This issue could be closed. |
I also got an error related to 'run_tasks('./config.yml')'. I have set all the Prerequisites same with the 'ReadMe.md' except the system. I run this code on Ubuntu 16.04, could you please tell me what is your system? Looking forward for your answer. |
I have the same operating system as you. Anyway, you can download the resnet50 model into the target folder, then the code can load that model and no errors happened. |
I haven't solve this error although I download the resnet50 model. I guess I may set the wrong path.Could you tell me how you set your folder(like dataset, 'resnet50.pth', etc)? |
/usr/local/lib/python3.*/dist-packages/torchvision/models/resnet50....pth |
THANK YOU SOOOOO MUCH! |
WELCOME. |
It works! |
Hello~Me again! Looking for your reply! |
I find the bad result is caused by my own error in the code! Now I solve this problem. Thanks! |
EOFError Traceback (most recent call last)
in
----> 1 run_tasks('./config.yml')
~/.conda/envs/prm/lib/python3.6/site-packages/nest/parser.py in run_tasks(config_file, param_file, verbose)
135 logger.info('Finished (%s).' % (U.format_elapse(seconds=(end_time - param_start_time).total_seconds())))
136 else:
--> 137 resolved_config = parse_config(config, env_vars=env_vars)
138 check_all_resolved(resolved_config)
139
~/.conda/envs/prm/lib/python3.6/site-packages/nest/parser.py in parse_config(config, env_vars, global_vars)
58 elif isinstance(val, dict):
59 config[key] = parse_config(
---> 60 val, env_vars=env_vars, global_vars=global_vars)
61 if key == '_var':
62 U.merge_dict(global_vars, config[key], union=True)
~/.conda/envs/prm/lib/python3.6/site-packages/nest/parser.py in parse_config(config, env_vars, global_vars)
58 elif isinstance(val, dict):
59 config[key] = parse_config(
---> 60 val, env_vars=env_vars, global_vars=global_vars)
61 if key == '_var':
62 U.merge_dict(global_vars, config[key], union=True)
~/.conda/envs/prm/lib/python3.6/site-packages/nest/parser.py in parse_config(config, env_vars, global_vars)
68 return nest_module(**config)
69 else:
---> 70 return nest_module(**config, delay_resolve=True)
71
72 return config
~/.conda/envs/prm/lib/python3.6/site-packages/nest/modules.py in call(self, *args, **kwargs)
160 try:
161 self._check_params(resolved_params)
--> 162 returns = self.func(**resolved_params)
163 except KeyError as exc_info:
164 if 'Nest module' in str(exc_info):
~/PRM-pytorch/install/prm.py in fc_resnet50(num_classes, pretrained)
17 """FC ResNet50.
18 """
---> 19 model = FC_ResNet(models.resnet50(pretrained), num_classes)
20 return model
21
~/.conda/envs/prm/lib/python3.6/site-packages/torchvision-0.2.1-py3.6.egg/torchvision/models/resnet.py in resnet50(pretrained, **kwargs)
186 model = ResNet(Bottleneck, [3, 4, 6, 3], **kwargs)
187 if pretrained:
--> 188 model.load_state_dict(model_zoo.load_url(model_urls['resnet50']))
189 return model
190
~/.conda/envs/prm/lib/python3.6/site-packages/torch/utils/model_zoo.py in load_url(url, model_dir, map_location, progress)
64 hash_prefix = HASH_REGEX.search(filename).group(1)
65 _download_url_to_file(url, cached_file, hash_prefix, progress=progress)
---> 66 return torch.load(cached_file, map_location=map_location)
67
68
~/.conda/envs/prm/lib/python3.6/site-packages/torch/serialization.py in load(f, map_location, pickle_module)
301 f = open(f, 'rb')
302 try:
--> 303 return _load(f, map_location, pickle_module)
304 finally:
305 if new_fd:
~/.conda/envs/prm/lib/python3.6/site-packages/torch/serialization.py in _load(f, map_location, pickle_module)
457 f.seek(0)
458
--> 459 magic_number = pickle_module.load(f)
460 if magic_number != MAGIC_NUMBER:
461 raise RuntimeError("Invalid magic number; corrupt file?")
EOFError: Ran out of input
The text was updated successfully, but these errors were encountered: