Code Monkey home page Code Monkey logo

Comments (4)

soumith avatar soumith commented on May 27, 2024

can you elaborate on what you mean by corrupted?

from vision.

yobajnin avatar yobajnin commented on May 27, 2024

Sorry, here's the details -

vgg19-dcbb9e9d.pth is not a tar/pax file:

pax -v -f vgg19-dcbb9e9d.pth
pax: Cannot identify format. Searching...
pax: cpio file name length 29486 is out of range
...

whereas the older version:
pax -v -f vgg19-341d7465.pth
---------- 1 root root 28 Dec 31 1969 ././@PaxHeader
-rw------- 1 12254 users 116 Dec 31 1969 sys_info
---------- 1 root root 28 Dec 31 1969 ././@PaxHeader
...

which is causing the error on load:
Traceback (most recent call last):
File "/usr/lib/python3.5/tarfile.py", line 182, in nti
n = int(s.strip() or "0", 8)
ValueError: invalid literal for int() with base 8: 'ons\nOrde'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.5/tarfile.py", line 2279, in next
tarinfo = self.tarinfo.fromtarfile(self)
File "/usr/lib/python3.5/tarfile.py", line 1083, in fromtarfile
obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors)
File "/usr/lib/python3.5/tarfile.py", line 1025, in frombuf
chksum = nti(buf[148:156])
File "/usr/lib/python3.5/tarfile.py", line 184, in nti
raise InvalidHeaderError("invalid header")
tarfile.InvalidHeaderError: invalid header

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "nn_style.py", line 89, in
NNStyle(args).run()
File "nn_style.py", line 37, in run
vgg = self._load_vgg()
File "nn_style.py", line 55, in _load_vgg
return models.vgg19( pretrained=True, ).features.cuda()
File "/nn/src/lib/pytorch_vision/torchvision/models/vgg.py", line 141, in vgg19
model.load_state_dict(model_zoo.load_url(model_urls['vgg19']))
File "/usr/local/lib/python3.5/dist-packages/torch/utils/model_zoo.py", line 57, in load_url
return torch.load(cached_file)
File "/usr/local/lib/python3.5/dist-packages/torch/serialization.py", line 248, in load
return _load(f, map_location, pickle_module)
File "/usr/local/lib/python3.5/dist-packages/torch/serialization.py", line 314, in _load
with closing(tarfile.open(fileobj=f, mode='r:', format=tarfile.PAX_FORMAT)) as tar,
File "/usr/lib/python3.5/tarfile.py", line 1575, in open
return func(name, filemode, fileobj, **kwargs)
File "/usr/lib/python3.5/tarfile.py", line 1605, in taropen
return cls(name, mode, fileobj, **kwargs)
File "/usr/lib/python3.5/tarfile.py", line 1470, in init
self.firstmember = self.next()
File "/usr/lib/python3.5/tarfile.py", line 2291, in next
raise ReadError(str(e))
tarfile.ReadError: invalid header

from vision.

soumith avatar soumith commented on May 27, 2024

are you on the latest pytorch? v0.1.10 ?

from vision.

yobajnin avatar yobajnin commented on May 27, 2024

That was it - I was on an older version of pytorch. Works now - thanks.

from vision.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.