Hi everybody, I'm quite a newbie in theano (and blocks) and I bumped into a problem that I consider as common, so I hope somebody could point me to the right solution.
I train some neural networks that are supposed to run in "production", i.e. on regular computer without GPU. However, in order to speedup the training, I train my models on a server with GPU. I save (pickle) the model once it is trained (still on GPU machine). Obviously, such pickle can't be unpickled on regular CPU computer since the model is dumped by using CudaArrays. I found out <http://stackoverflow.com/a/28958979> that setting theano.config.experimental.unpickle_gpu_on_cpu = True before unpickling the model solves this problem. I also manually dump some other variables such as the computational graph and a prediction function (theano function) into a dictionary. By using them, I can simply use the model. The problem is that I can't unpickle these functions and graphs when using a computer without GPU. The error is NameError: ('The following error happened while compiling the node', Shape_i {1}(W), '\n', "global name 'NVCC_compiler' is not defined") and it occurs on pred_fn = theano.function(computation_graph.inputs, unpickled_prediction_function, on_unused_input='ignore') Could you please help me out? The key questions are: 1. Can I load pickled functions and computational graphs on non-GPU machine? If yes, how? 2. If no, can I somehow pickle them on the GPU machine so that they can be loaded on non-GPU computer? If yes, how? 3. If no, how do you migrate the trained models from GPU to CPU? By that I mean especially the prediction function. Thank you Petr -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
