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

RuntimeError: unexpected EOF in python test.py #21

Open
aliraza0769 opened this issue Apr 9, 2021 · 1 comment
Open

RuntimeError: unexpected EOF in python test.py #21

aliraza0769 opened this issue Apr 9, 2021 · 1 comment

Comments

@aliraza0769
Copy link

we encountered runtime error when we simulated the below code line
!python test.py.

The following has been encountered

Traceback (most recent call last):
File "test.py", line 118, in
main()
File "test.py", line 46, in main
test(lines, model_path)
File "test.py", line 55, in test
net.load_state_dict(torch.load(model_path))
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.7/dist-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 3302200 more bytes. The file might be corrupted.

@Elin24
Copy link
Collaborator

Elin24 commented Oct 1, 2021

The state_dict (model_path) file might be corrupted.

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