I'm trying to train a model based on the Theano library. As my computer havn't enough memory to train this model, I need to do it in Google Colab. But I can't activate the GPU support of Theano.
This is how I installed Theano and Lasagne
!pip install --upgrade https://github.com/Theano/Theano/archive/master.zip
!pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
And here is the way that I try to acctivate the GPU support
import os
os.environ["THEANO_FLAGS"] = "mode=FAST_RUN,device=cuda,floatX=float32"
import theano
print(theano.config.__getattribute__('device'))
ERROR (theano.gpuarray): pygpu was configured but could not be imported or is too old (version 0.7 or higher required)
NoneType: None
cuda
I tried to upgrade pygpu using anaconda but anaconda is not installed in Google Collab.
Thanks in advence for your help.
condacolab
package:!pip install -q condacolab
import condacolab
condacolab.install()
condacolab
:import condacolab
condacolab.check()
theano
and pygpu
packages:!mamba install -y theano pygpu
theano
:import os
os.environ["THEANO_FLAGS"] = "device=cuda,floatX=float32"
import theano
print(theano.config.__getattribute__('device'))
To test Theano with GPU use the code from Theano docs.