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

ran out of input #21

Open
GrassBro opened this issue Feb 25, 2019 · 12 comments
Open

ran out of input #21

GrassBro opened this issue Feb 25, 2019 · 12 comments

Comments

@GrassBro
Copy link


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

@GrassBro
Copy link
Author

GrassBro commented Feb 25, 2019

Hi, Yanzhao, this error is related to 'run_tasks('./config.yml')', do you have any suggestions about this error? @ZhouYanzhao

@GrassBro
Copy link
Author

Hi, @ZhouYanzhao ,

59 config[key] = parse_config(
---> 60 val, env_vars=env_vars, global_vars=global_vars)

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,
Xin

@GrassBro
Copy link
Author

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.

@shamyW
Copy link

shamyW commented Mar 1, 2019

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.
Thanks a lot.

@GrassBro
Copy link
Author

GrassBro commented Mar 1, 2019

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.
Thanks a lot.

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 didn't change any code for simplification.

@shamyW
Copy link

shamyW commented Mar 3, 2019

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)?
Thanks again!

@GrassBro
Copy link
Author

GrassBro commented Mar 3, 2019

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)?
Thanks again!

/usr/local/lib/python3.*/dist-packages/torchvision/models/resnet50....pth
This is useful for me.

@shamyW
Copy link

shamyW commented Mar 3, 2019

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)?
Thanks again!

/usr/local/lib/python3.*/dist-packages/torchvision/models/resnet50....pth
This is useful for me.

THANK YOU SOOOOO MUCH!
I will try it!

@GrassBro
Copy link
Author

GrassBro commented Mar 3, 2019

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)?
Thanks again!

/usr/local/lib/python3.*/dist-packages/torchvision/models/resnet50....pth
This is useful for me.

THANK YOU SOOOOO MUCH!
I will try it!

WELCOME.

@shamyW
Copy link

shamyW commented Mar 4, 2019

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)?
Thanks again!

/usr/local/lib/python3.*/dist-packages/torchvision/models/resnet50....pth
This is useful for me.

THANK YOU SOOOOO MUCH!
I will try it!

WELCOME.

It works!
Thanks again! :D

@shamyW
Copy link

shamyW commented Mar 11, 2019

Hello~Me again!
I run this demo, but it seems that the result is much poor(I test the categeries label with VOC2007test(images 4000+) and it shows that the accuracy is 2%). I am wondering if you can reproduction the code and get the similar result with the author?

Looking for your reply!
Thank you so much!

@shamyW
Copy link

shamyW commented Mar 13, 2019

Hello~Me again!
I run this demo, but it seems that the result is much poor(I test the categeries label with VOC2007test(images 4000+) and it shows that the accuracy is 2%). I am wondering if you can reproduction the code and get the similar result with the author?

Looking for your reply!
Thank you so much!

I find the bad result is caused by my own error in the code! Now I solve this problem. Thanks!

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