i am trying to run this program  https://github.com/npow/ubottu for making 
a model for Ubuntu Dialog Corpus

It uses Theano and Lasagne as dependencies.

when i install Theano and Lasagne from pip, and do a simple 

import lasagne


i get the error

from theano.tensor.signal import downsampleImportError: cannot import name 
'downsample'


then found a workaround 
here, 
https://stackoverflow.com/questions/42998355/lasagne-vs-theano-possible-version-mismatch-windows
suggestion was to install Theano and Lasagne from their github master 
branches respectively

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


This removed the above erorr, but i am getting the following error.


TypeError: ('An update must have the same type as the original shared 
variable (shared_var=hid_init, shared_var.type=TensorType(float64, row), 
update_val=Elemwise{sub,no_inplace}.0, update_val.type=TensorType(float64, 
matrix)).', 'If the difference is related to the broadcast pattern, you can 
call the tensor.unbroadcast(var, axis_to_unbroadcast[, ...]) function to 
remove broadcastable dimensions.')



it seems that there is a type mismatch somewhere. a variable of row type is 
updated with a value of matrix type. Full traceback as follows :

Traceback (most recent call last):
  File "main.py", line 669, in <module>
    main()
  File "main.py", line 661, in main
    model = Model(**args.__dict__)
  File "main.py", line 375, in __init__
    self.update_params()
  File "main.py", line 408, in update_params
    self.train_model = theano.function([], self.cost, updates=updates, 
givens=givens, on_unused_input='warn')
  File 
"/home/vimal/anaconda2/lib/python2.7/site-packages/theano/compile/function.py"
, line 326, in function
    output_keys=output_keys)
  File 
"/home/vimal/anaconda2/lib/python2.7/site-packages/theano/compile/pfunc.py", 
line 449, in pfunc
    no_default_updates=no_default_updates)
  File 
"/home/vimal/anaconda2/lib/python2.7/site-packages/theano/compile/pfunc.py", 
line 208, in rebuild_collect_shared
    raise TypeError(err_msg, err_sug)
TypeError: ('An update must have the same type as the original shared 
variable (shared_var=cell_init, shared_var.type=TensorType(float64, row), 
update_val=Elemwise{sub,no_inplace}.0, update_val.type=TensorType(float64, 
matrix)).', 'If the difference is related to the broadcast pattern, you can 
call the tensor.unbroadcast(var, axis_to_unbroadcast[, ...]) function to 
remove broadcastable dimensions.')






the versions are
>>> import theano as th
>>> print th.__version__
0.10.0dev1.dev-RELEASE


>>> import lasagne as la
>>> print la.__version__
0.2.dev1






Can you help me to resolve this error? 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to