Discussion:
[theano-users] NameError: global name 'CVM' is not defined
Lucas Caccia
2017-10-22 16:35:56 UTC
Permalink
Hi,

I'm getting the following error when running theano code :
Traceback (most recent call last):
File "mnist_pixelvae_train.py", line 350, in <module>
eps = T.cast(theano_srng.normal(mu.shape), theano.config.floatX)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1574, in normal
nstreams=nstreams)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1354, in uniform
rstates = self.get_substream_rstates(nstreams, dtype)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/configparser.py",
line 117, in res
return f(*args, **kwargs)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1256, in get_substream_rstates
multMatVect(rval[0], A1p72, M1, A2p72, M2)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 66, in multMatVect
[A_sym, s_sym, m_sym, A2_sym, s2_sym, m2_sym], o, profile=False)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/compile/function.py",
line 326, in function
output_keys=output_keys)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/compile/pfunc.py",
line 486, in pfunc
output_keys=output_keys)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/compile/function_module.py",
line 1795, in orig_function
defaults)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/compile/function_module.py",
line 1661, in create
input_storage=input_storage_lists, storage_map=storage_map)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/gof/link.py",
line 699, in make_thunk
storage_map=storage_map)[:3]
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/gof/vm.py",
line 1098, in make_all
self.updated_vars,
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/gof/vm.py",
line 952, in make_vm
vm = CVM(
NameError: global name 'CVM' is not defined

After looking at previous posts, the fix seems to be to remove ~/.theano
directory. However, this does not work for me. The code runs file on my
school servers, but fails on compute canada clusters.
Any thoughts ? I'm running theano=0.9 and lasagne='0.2.dev1'


Thanks,
Lucas
--
---
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 theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2017-10-23 17:33:42 UTC
Permalink
Note, the Compute Canada cluster problem is independent of Theano, we also
have it ourself. Do not install anaconda manually yourself. Otherwise, you
will need to "fix" the installation due to the strange Compute Canada
configuration that end up with the error you show.

It should work with there software stack (but this will request you to
manually build libgpuarray/pygpu).

They also have beta doc on how to install conda yourself in a way that it
will work with Theano:
https://docs.computecanada.ca/wiki/Anaconda

I also suggest that you update Theano to the dev version or the last beta.
It have many great new features.

Also, check this page to use the new GPU interface:
https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
Post by Lucas Caccia
Hi,
File "mnist_pixelvae_train.py", line 350, in <module>
eps = T.cast(theano_srng.normal(mu.shape), theano.config.floatX)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1574, in normal
nstreams=nstreams)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1354, in uniform
rstates = self.get_substream_rstates(nstreams, dtype)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/configparser.py",
line 117, in res
return f(*args, **kwargs)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1256, in get_substream_rstates
multMatVect(rval[0], A1p72, M1, A2p72, M2)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 66, in multMatVect
[A_sym, s_sym, m_sym, A2_sym, s2_sym, m2_sym], o, profile=False)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/compile/function.py",
line 326, in function
output_keys=output_keys)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/compile/pfunc.py",
line 486, in pfunc
output_keys=output_keys)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/compile/function_module.py",
line 1795, in orig_function
defaults)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/compile/function_module.py",
line 1661, in create
input_storage=input_storage_lists, storage_map=storage_map)
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/gof/link.py",
line 699, in make_thunk
storage_map=storage_map)[:3]
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/gof/vm.py",
line 1098, in make_all
self.updated_vars,
File
"/home/lpagec/anaconda2/envs/theano_cedar/lib/python2.7/site-packages/theano/gof/vm.py",
line 952, in make_vm
vm = CVM(
NameError: global name 'CVM' is not defined
After looking at previous posts, the fix seems to be to remove ~/.theano
directory. However, this does not work for me. The code runs file on my
school servers, but fails on compute canada clusters.
Any thoughts ? I'm running theano=0.9 and lasagne='0.2.dev1'
Thanks,
Lucas
--
---
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
For more options, visit https://groups.google.com/d/optout.
--
---
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 theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...