Theano / Theano

Theano was a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It is being continued as PyTensor: www.github.com/pymc-devs/pytensor

Home Page:https://www.github.com/pymc-devs/pytensor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Theano for Pylearn2

VidushB opened this issue · comments

For a research project, my group and I are struggling with imports. None of us are computer science majors and so we really feel out of our depth.

I have imported theano, anaconda and pylearn2 to use in Jupyter Notebooks for Ian Goodfellow's original GAN paper. When trying to import
from pylearn2.space import VectorSpace however, I am getting an error associated with Theano GPU backend

The original code from the download had a theano line:

from theano.sandbox.cuda.type import CudaNdarrayType

which to my knowledge aims to bring in GPU backend.

SkipTest: You are importing theano.sandbox.cuda. This is the old GPU back-end and is removed from Theano. Use Theano 0.9 to use it. Even better, transition to the new GPU back-end! See https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29

is the error that I get. It seems that theano.sandbox has been replaced? I tried getting up to date:

I applied:
conda install theano pygpu
conda install -c mila-udem -c mila-udem/label/pre theano pygpu
to get theano up to date

Doing so, I replaced code with:
from theano.gpuarray.dnn import cuDNN

hoping for a smooth execution.

The error seen was:

cannot import name 'cuDNN' from 'theano.gpuarray.dnn'
as per what I have read from theano based pages, that is a very legal line of code.

Any help is appreciated and I will try to answer any follow up to the best of my limited ability