When a script in the 1st jupiter note book runs it gives me “ImportError: cannot import name opt” even though it is literally in the same folder.
C:\Users\student\Anaconda2\lib\site-packages\theano\tensor\__init__.py in <module>()
13 TensorConstantSignature, TensorConstant)
—> 15 from theano.tensor import opt
16 from theano.tensor import opt_uncanonicalize
17 from theano.tensor import blas
I can’t figure this one out.
I also have this problem.
Have you guys added the configuration file for theano and keras?
On Ubuntu you create
device = cuda
floatX = float32
root = /usr/local/cuda-\<version\>
If you are using windows then I don’t know the answer
How do I setup the theano arc? I don’t have any usr or local or cuda folders. I’m dual booting and am trying this on ubuntu. My own computer has cpu only and I haven’t set-up aws yet. Would that be need to be set to something else for cpu only right now until it connects to aws?
Also the error mysteriously changed from that to:
/home/daniel/anaconda2/lib/python2.7/site-packages/keras/backend/theano_backend.pyc in in_train_phase(x, alt)
1172 elif _LEARNING_PHASE is 0:
1173 return alt
-> 1174 x = theano.ifelse.ifelse(_LEARNING_PHASE, x, alt)
1175 x._uses_learning_phase = True
1176 return x
AttributeError: 'module' object has no attribute 'ifelse'
Just like someone else commented, a reboot fixed this problem…got a different one though - “To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.”…off I go searching again
@digdeeper add the following line to file
Have you installed the cuda and anaconda ?
You can follow this tutorial
Thank you, the env variable fixed it!
I’ve installed anaconda but not explicitly installed cuda. My own computer doesn’t have nvidia driver so I wanted to run on my own computer with cpu only before moving onto aws to save money.
I am using Ananaconda 2.7 on Ubuntu 16.04 LTS
I also got the same error after conda install from requirements.txt
For some of the guys the system reboot does solved the problem. For me the following steps solved the issue.
Uninstall theano. Then install theano requirement packages
$ conda install mkl nose sphinx pydot-ng
$ conda install theano
http://deeplearning.net/software/theano_versions/dev/install_ubuntu.html for more details about theano installation.
I am having this problem also.
I’ve tried uninstalling theano to install the dependencies and reinstalling thano; I do have an environment variable set so that $MKL_THREADING_LAYER = GNU .
I’m just ramping up into the
fast.ai course so my problem could be something obvious - I appreciate any suggestion of what to check!
Please read the thread below for details
Are you sure, you want to start from Part 1 v1 of course? Do you have special to reason learn the material taught in that part? It uses Python 2.7, a large number of libraries have started to drop support for Python 2.7. It mainly uses the theano as backend which is dead for long It uses the Keras 1.2.2, now which is updated to major revision 2.0 with major changes in API. I would recommend start from part 1 v2
I am pretty sure you’re right - the truth is that I don’t know where to find the course part 1 v2 notebooks. I am hoping to do the course on the AWS EC2 instance I have rather than paperspace.
i got the same problem and the better solution to me was to uninstall the existing version of mkl and install the 2017 version of mkl using conda
conda install mkl=2017
Are you sure, you want to start from Part 1 v1 of course? Do you have special to reason learn the material taught in that part? It uses Python 2.7, a large number of libraries have started to drop support for Python 2.7. It mainly uses the theano as backend which is dead for long It uses the Keras 1.2.2, now which is updated to major revision 2.0 with major changes in API. I would recommend start from part 1
I would recommend switching to that course.