cortex_old
cortex_old copied to clipboard
Failing tests while on debian sid amd64
Just tried running tests on debian testing/sid with theano installed from debian pkgs (0.7-1~exp1) to observe following failed tests
> nosetests -s -v --with-cov --cover-package cortex .
...
ERROR: test_demos.test_classifier
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/tests/test_demos.py", line 18, in test_classifier
classifier.train(**exp_dict)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/classifier.py", line 188, in train
inps, cost, tparams, constants, updates, extra_outs, **learning_args)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/utils/training.py", line 289, in set_optimizer
extra_outs=extra_outs, **optimizer_args)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/utils/op.py", line 295, in sgd
inp, [cost]+extra_outs, updates=gsup+extra_ups, profile=profile)
File "/usr/lib/python2.7/dist-packages/theano/compile/function.py", line 266, in function
profile=profile)
File "/usr/lib/python2.7/dist-packages/theano/compile/pfunc.py", line 489, in pfunc
no_default_updates=no_default_updates)
File "/usr/lib/python2.7/dist-packages/theano/compile/pfunc.py", line 217, 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=MLP_W0_grad, shared_var.type=TensorType(float32, matrix), update_val=dot.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.')
======================================================================
ERROR: test_demos.test_rbm
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/tests/test_demos.py", line 25, in test_rbm
rbm_mnist.train(**exp_dict)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/rbm_mnist.py", line 133, in train
_, z_updates = model.update_partition_function(K=1000)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/models/rbm.py", line 399, in update_partition_function
log_za, d_logz, var_dlogz, log_ws, samples = self.ais(K, M)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/models/rbm.py", line 471, in ais
p0 = T.tile(1. / (1. + T.exp(-b_a)), (M, 1))
File "/usr/lib/python2.7/dist-packages/theano/tensor/basic.py", line 4268, in tile
raise ValueError("len(reps) != x.ndim not currently supported")
ValueError: len(reps) != x.ndim not currently supported
======================================================================
ERROR: test_demos.test_rbm_cifar
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/tests/test_demos.py", line 28, in test_rbm_cifar
test_rbm(epochs=epochs, yaml='rbm_cifar.yaml')
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/tests/test_demos.py", line 25, in test_rbm
rbm_mnist.train(**exp_dict)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/rbm_mnist.py", line 133, in train
_, z_updates = model.update_partition_function(K=1000)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/models/rbm.py", line 399, in update_partition_function
log_za, d_logz, var_dlogz, log_ws, samples = self.ais(K, M)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/models/rbm.py", line 471, in ais
p0 = T.tile(1. / (1. + T.exp(-b_a)), (M, 1))
File "/usr/lib/python2.7/dist-packages/theano/tensor/basic.py", line 4268, in tile
raise ValueError("len(reps) != x.ndim not currently supported")
ValueError: len(reps) != x.ndim not currently supported
======================================================================
ERROR: test_demos.test_vae
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/tests/test_demos.py", line 35, in test_vae
vae.train(**exp_dict)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/demos/demos_basic/vae.py", line 174, in train
inps, cost, tparams, constants, updates, extra_outs, **learning_args)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/utils/training.py", line 289, in set_optimizer
extra_outs=extra_outs, **optimizer_args)
File "/home/yoh/proj/pymvpa/papers/talk-ohbm2015-signitools/3rd/cortex/cortex/utils/op.py", line 270, in rmsprop
inp, [cost]+extra_outs, updates=zgup+rgup+rg2up+extra_ups, profile=profile)
File "/usr/lib/python2.7/dist-packages/theano/compile/function.py", line 266, in function
profile=profile)
File "/usr/lib/python2.7/dist-packages/theano/compile/pfunc.py", line 489, in pfunc
no_default_updates=no_default_updates)
File "/usr/lib/python2.7/dist-packages/theano/compile/pfunc.py", line 217, 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=gbn_posterior_W1_grad, shared_var.type=TensorType(float32, matrix), update_val=dot.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.')
Sorry, I knew about this issue and I need to modify the setup script to address this. In your ~/.theanorc (if it exists), you need the following fields:
[global]
floatX=float32
.
I will add this to the setup soon.
I've added .theanorc to setup in the development branch and this will be merged soon.