Same error

On Thursday, December 31, 2015 at 8:10:59 PM UTC+5:30, Norbert Nyakó wrote:
>
> Hi,
>
> I am trying to create a CNN on a database and I have the following error 
> when I run my software:
>
>
> Traceback (most recent call last):
>   File "main.py", line 202, in <module>
>     main()    
>   File "main.py", line 168, in main
>     train_fn = theano.function([input_var, target_var], loss, updates=
> updates)
>   File "/usr/local/lib/python2.7/dist-packages/theano/compile/function.py"
> , line 317, in function
>     output_keys=output_keys)
>   File "/usr/local/lib/python2.7/dist-packages/theano/compile/pfunc.py", 
> line 526, in pfunc
>     output_keys=output_keys)
>   File 
> "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py"
> , line 1778, in orig_function
>     defaults)
>   File 
> "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py"
> , line 1642, in create
>     input_storage=input_storage_lists, storage_map=storage_map)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/link.py", line 
> 690, in make_thunk
>     storage_map=storage_map)[:3]
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/vm.py", line 
> 1037, in make_all
>     no_recycling))
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/op.py", line 932
> , in make_thunk
>     no_recycling)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/op.py", line 850
> , in make_c_thunk
>     output_storage=node_output_storage)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py", line 
> 1207, in make_thunk
>     keep_lock=keep_lock)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py", line 
> 1152, in __compile__
>     keep_lock=keep_lock)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py", line 
> 1602, in cthunk_factory
>     key=key, lnk=self, keep_lock=keep_lock)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/cmodule.py", 
> line 1174, in module_from_key
>     module = lnk.compile_cmodule(location)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py", line 
> 1513, in compile_cmodule
>     preargs=preargs)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/cmodule.py", 
> line 2196, in compile_str
>     return dlimport(lib_filename)
>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/cmodule.py", 
> line 331, in dlimport
>     rval = __import__(module_name, {}, {}, [module_name])
> ImportError: ('The following error happened while compiling the node', 
> CorrMM{(0, 0), (1, 1)}(inputs, Subtensor{::, ::, ::int64, ::int64}.0), 
> '\n', 
> '/home/spirit/.theano/compiledir_Linux-3.13--generic-x86_64-with-Ubuntu-14.04-trusty-x86_64-2.7.6-64/tmpasyxKQ/85e2242450cf2f0834a8a7bd5c27961f.so:
>  undefined symbol: dgemm_', '[CorrMM{(0, 0), (1, 1)}(inputs, 
> <TensorType(float64, 4D)>)]')
>
>
> I am using the following libraries: 
>
> - Theano 0.7.0
> - Lasagne 0.2.dev1 (but the error occurs in a different versions too)
>
> And I tested it on Windows and Linux (Ubuntu 14.04) too.
> The code looks like this (I only copied the relevant parts):
>
> def main():
>  people = read_data()
>  train_set, test_set = split_data(people)
>
>
>  print "Train set dimensions", train_set['images'].shape, train_set[
> 'annotations'].shape
>
>
>  # Prepare Theano variables for inputs and targets
>  input_var = T.tensor4('inputs')
>  target_var = T.ivector('targets')
>  
>  l_in = lasagne.layers.InputLayer(shape=(None, 1, 36, 60), input_var=
> input_var)
>  l_conv1 = lasagne.layers.Conv2DLayer(l_in, num_filters=20, filter_size=(4
> , 4), W=lasagne.init.Normal())
>  l_pool1 = lasagne.layers.MaxPool2DLayer(l_conv1, pool_size=2)
>  l_drop1 = lasagne.layers.DropoutLayer(l_pool1, p=0.1)
>  l_conv2 = lasagne.layers.Conv2DLayer(l_drop1, num_filters=50, filter_size
> =(4, 4), W=lasagne.init.Normal())
>  l_pool2 = lasagne.layers.MaxPool2DLayer(l_conv1, pool_size=2)
>  l_drop2 = lasagne.layers.DropoutLayer(l_pool2, p=0.2)
>  l_hid2 = lasagne.layers.DenseLayer(l_drop2, num_units=400, nonlinearity=
> lasagne.nonlinearities.rectify)
>  l_out = lasagne.layers.DenseLayer(l_hid2, num_units=3, nonlinearity=None)
>  
>  # Create a loss expression for training, i.e., a scalar objective we want
>  # to minimize (for our multi-class problem, it is the cross-entropy 
> loss):
>  prediction = lasagne.layers.get_output(l_out)
>  loss = lasagne.objectives.squared_error(prediction, target_var)
>  loss = loss.mean()
>
>
>  # We could add some weight decay as well here, see 
> lasagne.regularization.
>
>
>  # Create update expressions for training, i.e., how to modify the
>  # parameters at each training step. Here, we'll use Stochastic Gradient
>  # Descent (SGD) with Nesterov momentum, but Lasagne offers plenty more.
>  params = lasagne.layers.get_all_params(l_out, trainable=True)
>  updates = lasagne.updates.sgd(loss, params, learning_rate=0.01)
>
>
>  # Create a loss expression for validation/testing. The crucial difference
>  # here is that we do a deterministic forward pass through the network,
>  # disabling dropout layers.
>  test_prediction = lasagne.layers.get_output(l_out, deterministic=True)
>  test_loss = lasagne.objectives.squared_error(test_prediction, target_var)
>  test_loss = test_loss.mean()
>  # As a bonus, also create an expression for the classification accuracy:
>  test_acc = T.mean(T.eq(T.argmax(test_prediction, axis=1), target_var), 
> dtype=theano.config.floatX)
>  
>  # Compile a function performing a training step on a mini-batch (by 
> giving
>  # the updates dictionary) and returning the corresponding training loss:
>  train_fn = theano.function([input_var, target_var], loss, updates=updates
> ) *# there is the error*
>
>
> *Could you help me in this?*
>
> *Thank you in advance!*
>
> *Best regards,*
> *Norbert*
>

-- 

--- 
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