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

Which library versions are used? #1

Open
phiresky opened this issue Sep 23, 2016 · 4 comments
Open

Which library versions are used? #1

phiresky opened this issue Sep 23, 2016 · 4 comments

Comments

@phiresky
Copy link

phiresky commented Sep 23, 2016

I got

Traceback (most recent call last):
  File "NPE.py", line 57, in <module>
    config_module = imp.load_source('config',config_path)
  File "IAN_simple.py", line 12, in <module>
    from lasagne.layers import batch_norm as BN
ImportError: cannot import name batch_norm

when trying to run this with stable lasagne.

That appears to be fixed after running

sudo pip2 install --upgrade https://github.com/Theano/Theano/archive/master.zip
sudo pip2 install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip

But now I get

Compiling Theano Functions
Traceback (most recent call last):
  File "NPE.py", line 75, in <module>
    Xh = lasagne.layers.get_output(model['l_out'],{model['l_latents']:ZZ},deterministic=True)
  File "/usr/lib/python2.7/site-packages/lasagne/layers/helper.py", line 191, in get_output
    all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs)
  File "/usr/lib/python2.7/site-packages/lasagne/layers/conv.py", line 330, in get_output_for
    conved = self.convolve(input, **kwargs)
  File "/home/tehdog/data/tmp/nobackup/pkg/Neural-Photo-Editor/layers.py", line 277, in convolve
    img = gpu_contiguous(input)
  File "/usr/lib/python2.7/site-packages/theano/gof/op.py", line 602, in __call__
    node = self.make_node(*inputs, **kwargs)
  File "/usr/lib/python2.7/site-packages/theano/sandbox/cuda/basic_ops.py", line 3963, in make_node
    input = as_cuda_ndarray_variable(input)
  File "/usr/lib/python2.7/site-packages/theano/sandbox/cuda/basic_ops.py", line 46, in as_cuda_ndarray_variable
    return gpu_from_host(tensor_x)
  File "/usr/lib/python2.7/site-packages/theano/gof/op.py", line 602, in __call__
    node = self.make_node(*inputs, **kwargs)
  File "/usr/lib/python2.7/site-packages/theano/sandbox/cuda/basic_ops.py", line 139, in make_node
    dtype=x.dtype)()])
  File "/usr/lib/python2.7/site-packages/theano/sandbox/cuda/type.py", line 95, in __init__
    (self.__class__.__name__, dtype, name))
TypeError: CudaNdarrayType only supports dtype float32 for now. Tried using dtype float64 for variable None

Can you elaborate which exact versions of the libraries you are using?

@phiresky phiresky changed the title Needs dev versions of Lasagne Which library versions are used? Sep 23, 2016
@ruXlab
Copy link

ruXlab commented Sep 23, 2016

I solved that problem by installing lasagne like

pip install https://github.com/Lasagne/Lasagne/archive/master.zip

Ubuntu 16.04 x64

@phiresky
Copy link
Author

I solved it by creating the file ~/.theanorc as described in dnouri/kfkd-tutorial#5 (comment) .

Some information about using Lasagne master should probably be added to the readme, and maybe something about theanorc too (not sure if that is obvious, have not used theano like this before).

@ajbrock
Copy link
Owner

ajbrock commented Sep 23, 2016

Hi guys,

I'm using the dev versions of both libraries (so Theano 0.9.0dev2 and lasagne 0.2dev1), and I've got the standard theano flags set to floatX=float32 and time_once for all the DNN flags. I didn't anticipate getting people outside of a relatively small academic community looking at any of this, so I'll be sure to update the readme with something a bit more user-friendly soon.

@phiresky
Copy link
Author

Thanks.

I didn't anticipate getting people outside of a relatively small academic community looking at any of this

Well you did post it on reddit :) I'm just happy you published actual, running code together with your paper, which seems to happen far too seldom in my opinion.

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