The error says to replace “device = gpu” with “device = cuda” in .theanorc. Give that a shot and let us know what happens. You will need to restart your Jupyer notebook kernel and reimport theano.
Note: Theano is no longer being developed (source), and you should switch to another framework eventually. Consider PyTorch or Tensorflow. Depending where you are on your fast.ai learning path, one may be more appropriate than the other.
Here are some PyTorch versions of some fast.ai part 1 notebooks:
https://github.com/recastrodiaz/fastai-course-1-pytorch
Here’s a thread with some more PyTorch learning resources:
http://forums.fast.ai/t/part-1-notebooks-in-pytorch/3114
I don’t mean to overwhelm. If the theano change works, it might be better to go along with it for a while and switch after seeing the deep learning concepts in action.