0

What i want

To run a simple python script like the following, but instead of the CPU I want it to use the GPU:

import theano

def some_convolutional_neural_network():
    #Insert (theano) code here

What I would like is a comprehensive instruction on how to achieve this, as the theano documentation is pretty complicated. For me and future readers, it would be nice if such a heuristic description was available.

What i've tried

First of all I've followed the Installation instructions for windows. Then I tried to enable theano to use my GPU.

I've found a partial answer here and it seems the way to go is to either modify the environment variable THEANO_FLAGS or a configuration file called .theanorc is a configuration file. However, the documentation is unclear to me and I cannot find the environment var nor the config file anywhere. Any help would be greatly appreciated as I am rather stuck here.

My specs: I am on windows 10, and I have a GeForce GTX 650 Ti.

Psychotechnopath
  • 2,471
  • 5
  • 26
  • 47
  • It is impossible to "run" standard python code on a GPU – talonmies Aug 06 '19 at 11:02
  • Allright, but I know that using a GPU can sometimes be beneficial over using a CPU. I am sorry if this is not a good question, but I am a beginner in the topic. A turtorial on NN Im following (http://neuralnetworksanddeeplearning.com/chap6.html#the_code_for_our_convolutional_networks) states "In particular, one great feature of Theano is that it can run code on either a CPU or, if available, a GPU. Running on a GPU provides a substantial speedup and, again, helps make it practical to train more complex networks". If I can't simply "run" standard python code on GPU, how do I configure my script – Psychotechnopath Aug 06 '19 at 16:02
  • so that it utilizes my GPU? Please give me a push in the right direction kind sir =) Am rather stuck on this topic! And you seem to be an expert on CUDA. Any resources on GPU computing would be greatly appreciated – Psychotechnopath Aug 06 '19 at 16:03
  • Or do you have any suggestions for me to edit the question so that it *does* become a good/useful question to future readers? Am very much willing to learn. – Psychotechnopath Aug 07 '19 at 08:02

0 Answers0