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

Model_best.pth.tar is corrupted/damaged file #3

Open
qaazii opened this issue Dec 7, 2018 · 4 comments
Open

Model_best.pth.tar is corrupted/damaged file #3

qaazii opened this issue Dec 7, 2018 · 4 comments

Comments

@qaazii
Copy link

qaazii commented Dec 7, 2018

No description provided.

@qaazii
Copy link
Author

qaazii commented Dec 7, 2018

its not working how to find

@dexception
Copy link

+1

@dee6600
Copy link

dee6600 commented Nov 11, 2019

python pred.py --img_dir img/ --output_csvpath result.csv --model model_best.pth.tar --cuda
*** loading model from model_best.pth.tar
Traceback (most recent call last):
File "pred.py", line 116, in
main()
File "pred.py", line 72, in main
model.load_state_dict(torch.load(f)['state_dict'])
File "C:\Users\dee\Anaconda3\lib\site-packages\torch\serialization.py", line 426, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "C:\Users\dee\Anaconda3\lib\site-packages\torch\serialization.py", line 595, in _load
return legacy_load(f)
File "C:\Users\dee\Anaconda3\lib\site-packages\torch\serialization.py", line 506, in legacy_load
with closing(tarfile.open(fileobj=f, mode='r:', format=tarfile.PAX_FORMAT)) as tar,
File "C:\Users\dee\Anaconda3\lib\tarfile.py", line 1591, in open
return func(name, filemode, fileobj, **kwargs)
File "C:\Users\dee\Anaconda3\lib\tarfile.py", line 1621, in taropen
return cls(name, mode, fileobj, **kwargs)
File "C:\Users\dee\Anaconda3\lib\tarfile.py", line 1484, in init
self.firstmember = self.next()
File "C:\Users\dee\Anaconda3\lib\tarfile.py", line 2289, in next
tarinfo = self.tarinfo.fromtarfile(self)
File "C:\Users\dee\Anaconda3\lib\tarfile.py", line 1094, in fromtarfile
buf = tarfile.fileobj.read(BLOCKSIZE)
File "C:\Users\dee\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 338: character maps to

not working !!!

@dexception
Copy link

I am able to run it on ubuntu 16.04, cuda 9.0, cudnn 7.0.5, python2

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

3 participants