Hi All,

can someone help me diagnose where I am going wrong. 

I installed anaconda, tensorflow, cuda, keras and theano. I can import 
standard python packages like numpy, scipy pandas, etc. However, I am 
having trouble importing theano, via keras. When I import keras, it gives 
this error:

import keras
Using Theano backend.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/keras/__init__.py",
 
line 2, in <module>
    from . import backend
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/keras/backend/__init__.py",
 
line 58, in <module>
    from .theano_backend import *
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/keras/backend/theano_backend.py",
 
line 1, in <module>
    import theano
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/theano/__init__.py",
 
line 103, in <module>
    import theano.sandbox.cuda
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/theano/sandbox/cuda/__init__.py",
 
line 697, in <module>
    use(device=config.device, force=config.force_device, test_driver=False)
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/theano/sandbox/cuda/__init__.py",
 
line 516, in use
    device = int(device[3:])
ValueError: invalid literal for int() with base 10: '  # switch to cpu if 
no GPU is available on your machine'


Now, I know my GPU works because I can run the samples. My theano.rc looks 
like this:
[global]
floatX = float32
device = gpu  # switch to cpu if no GPU is available on your machine

[nvcc]
fastmath = True

[lib]
cnmem=.90

[cuda]
root = /usr/local/cuda-7.5/

If I remove the line device=gpu by commenting it out, then I get this error:
 import keras
Using Theano backend.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/keras/__init__.py",
 
line 2, in <module>
    from . import backend
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/keras/backend/__init__.py",
 
line 58, in <module>
    from .theano_backend import *
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/keras/backend/theano_backend.py",
 
line 1, in <module>
    import theano
  File 
"/home/nkiruka_ubuntu/anaconda3/envs/deep-learning/lib/python3.5/site-packages/theano/__init__.py",
 
line 95, in <module>
    if hasattr(theano.tests, "TheanoNoseTester"):
AttributeError: module 'theano' has no attribute 'tests'


Can anyone direct me as to where I am going wrong?

Thanks


-- 

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