lasagne-draw
lasagne-draw copied to clipboard
Some errors to run mnist_draw.py in examples
Hi :)
Thanks a lot for your codes.
I tried to run mnist_draw.py in examples folder after installation, and I got some errors.
I solved the issues by following modifications. (I installed theano and lasagne with sudo)
- lasagne-draw/deepmodels/init.py
change followings
from . import confusionmatrix
from . import layers
from . import batchiterator
to follows;import confusionmatrix
import layers
import batchiterator
- lasagne-draw/deepmodels/layers/init.py
change followings
from .base import *
from .draw import *
to as follows;from lasagne.layers.base import *
from draw import *
- lasagne-draw/deepmodels/layers/draw.py
line 8
comment out
from .. import logdists
Hey, I have same error as you had. Did you solve the issue or not? If you solved the issue then let me know please. I also want to run the code.
Thanks
I also go the same errors, and the fixes above seem to work. Except there are more errors to deal with as well.
On line 35 of draw.py I'm getting
TypeError: __init__() got an unexpected keyword argument 'avg'
Changing 35 to
ini = init.Normal(std=0.01)
silences this one. But then I am also getting an error on line 70
AttributeError: 'InputLayer' object has no attribute 'get_output_shape'
I found this link that suggested this was because of an api change in lasagne. So I changed it to
num_batch, num_inputs = self.input_layer.output_shape()
But now I get
TypeError: 'tuple' object is not callable
It looks like this is being called from line 81 of mnist_draw.py
grad_clip_vals_out=[-1.0,1.0])
But I'm not sure where to go next...
@aferriss here are some more changes I made
- instead of
num_batch, num_inputs = self.input_layer.output_shape() change it to import lasagne.layers num_batch, num_inputs = lasagne.layers.get_output_shape(self.input_layer) this may not be necessary but I did it anyway just to follow the lasagne's API - in draw.py, replace all self.create_param by self.add_param, this is possibly due to an API change. Note: after this, there are some cases where () has to be changed to [] for the second parameter to self.add_param when error prompts says 'int' objects are not iterable.
and it starts training in my case.