ARC icon indicating copy to clipboard operation
ARC copied to clipboard

Dependencies for this code

Open jluo-bgl opened this issue 8 years ago • 3 comments

Hi, could you please provide the version you are using for lasagne and theano I'm using Theano 0.9 and Lasagne master version but seems incompatible Thank you.

jluo-bgl avatar Aug 17 '17 07:08 jluo-bgl

They are the exact same versions that I used (I don't think Lasagne has seen an API breaking update since). Can you please provide the error message that you are getting when you try to run this?

pranv avatar Aug 17 '17 08:08 pranv

image The error comes from layers.py, line 95

File "/git/ARC/carc.py", line 114, in prediction = get_output(l_y) File "anaconda/envs/dl-mini/lib/python3.5/site-packages/lasagne/layers/helper.py", line 197, in get_output all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs) File "git/ARC/layers.py", line 95, in get_output_for odd_input = input[:B] File "anaconda/envs/dl-mini/lib/python3.5/site-packages/theano/tensor/var.py", line 519, in getitem theano.tensor.subtensor.Subtensor.convert(arg) File "anaconda/envs/dl-mini/lib/python3.5/site-packages/theano/tensor/subtensor.py", line 378, in convert slice_b = Subtensor.convert(b, False) File "anaconda/envs/dl-mini/lib/python3.5/site-packages/theano/tensor/subtensor.py", line 349, in convert raise TypeError("Expected an integer") TypeError: Expected an integer Exception ignored in: <function WeakValueDictionary.init..remove at 0x10d843048> Traceback (most recent call last): File "anaconda/envs/dl-mini/lib/python3.5/weakref.py", line 117, in remove TypeError: 'NoneType' object is not callable

jluo-bgl avatar Aug 18 '17 01:08 jluo-bgl

Hey, my code is in Python 2. You are running Python 3 and the division B = input.shape[0] / 2 is returning a float instead of an int. It is causing problems when indexing here: odd_input = input[:B]

pranv avatar Aug 18 '17 03:08 pranv