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

Numpy fails to interpret IAN_Simple.npz? #11

Closed
graynk opened this issue Nov 4, 2016 · 1 comment
Closed

Numpy fails to interpret IAN_Simple.npz? #11

graynk opened this issue Nov 4, 2016 · 1 comment

Comments

@graynk
Copy link

graynk commented Nov 4, 2016

Hi, I finally managed to install cuda and dev versions of lasagne and theano. Now when I try to launch NPE I get this:

gray@gray-linux:~/Neural-Photo-Editor$ python NPE.py
Using gpu device 0: GeForce GTX 970 (CNMeM is disabled, cuDNN 5105)
Loading weights
Traceback (most recent call last):
File "NPE.py", line 53, in
model = IAN(config_path = 'IAN_simple.py', dnn = True)
File "/home/gray/Neural-Photo-Editor/API.py", line 30, in init
GANcheckpoints.load_weights(self.weights_fname,params)
File "/home/gray/Neural-Photo-Editor/GANcheckpoints.py", line 39, in load_weights
param_dict = np.load(fname)
File "/home/gray/miniconda2/lib/python2.7/site-packages/numpy/lib/npyio.py", line 416, in load
"Failed to interpret file %s as a pickle" % repr(file))
IOError: Failed to interpret file 'IAN_simple.npz' as a pickle

Am I doing something wrong? As far as I can understand from search results, np.load is used for binary .npz files, but all I can see in IAN_Simple.npz are three strings of text:

version https://git-lfs.github.com/spec/v1
oid sha256:82e5fd3ff68b2c9095935c9db269e086e2dd27704b629853e1f03473e7059bd7
size 205207893

UPD: Whoops, my bad. For some reason git clone didn't download raw .npz files. I downloaded them manually and now everything works

@ajbrock
Copy link
Owner

ajbrock commented Nov 4, 2016

Glad I could help! =p I'm guessing it has to do with the fact that I uploaded them using git-lfs, which may or may not be a requirement for downloading them? Not entirely sure.

@ajbrock ajbrock closed this as completed Nov 4, 2016
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