chen0040 / mxnet-text-to-image

Text to Image translation using Generative Adversarial Network and MXNet
MIT License
3 stars 2 forks source link

error: "GPU is not enabled" #1

Open SamSchrader opened 6 years ago

SamSchrader commented 6 years ago

Here is my output when trying to run dcgan2_test.py
Any help would be appreciated. I've followed the guide here https://www.tensorflow.org/install/gpu for enabling gpu. I am running cuda 10.0

Thank you

(thesispy) C:\Users\samuelschrader\Desktop\new text to image generation try sept2018\mxnet-text-to-image-master\demo>python dcgan2_test.py

INFO:root:loading glove embedding from data/glove/glove.6B.300d.pickle DEBUG:root:loading glove from pickle tooks 1.9 seconds C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\gluon\block.py:413: UserWarning: load_params is deprecated. Please use load_parameters. warnings.warn("load_params is deprecated. Please use load_parameters.") Traceback (most recent call last): File "dcgan2_test.py", line 38, in main() File "dcgan2_test.py", line 27, in main gan.load_model(model_dir_path=model_dir_path) File "C:\Users\samuelschrader\Desktop\new text to image generation try sept2018\mxnet-text-to-image-master\demo\mxnet_text_to_image\library\dcgan2.py", line 150, in load_model self.netG.load_params(self.get_params_file_path(model_dir_path, 'netG'), ctx=self.model_ctx) File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\gluon\block.py", line 414, in load_params self.load_parameters(filename, ctx, allow_missing, ignore_extra) File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\gluon\block.py", line 379, in load_parameters filename, ctx, allow_missing, ignore_extra, self.prefix) File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\gluon\parameter.py", line 796, in load self[name]._load_init(arg_dict[name], ctx) File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\gluon\parameter.py", line 216, in _load_init self._init_impl(data, ctx) File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\gluon\parameter.py", line 256, in _init_impl self._data = [data.copyto(ctx) for ctx in self._ctx_list] File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\gluon\parameter.py", line 256, in self._data = [data.copyto(ctx) for ctx in self._ctx_list] File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\ndarray\ndarray.py", line 1973, in copyto return _internal._copyto(self, out=hret) File "", line 25, in _copyto File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet_ctypes\ndarray.py", line 92, in _imperative_invoke ctypes.byref(out_stypes))) File "C:\Users\samuelschrader\AppData\Local\Continuum\anaconda3\envs\thesispy\lib\site-packages\mxnet\base.py", line 149, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [09:37:58] C:\ci\libmxnet_1533398173145\work\src\ndarray\ndarray.cc:1292: GPU is not enabled

SamSchrader commented 5 years ago

Resolved by rebuilding environment.

chen0040 commented 5 years ago

you can change the "mxnet-cu90" in the requirements.txt to "mxnet" which does not use gpu, but it will be very slow without gpu

SamSchrader commented 5 years ago

Thanks for the tip. Thankfully I got the gpu working, since even with the gpu, training took a few days with dataset I was using. I tremble to think how long it would have taken with the cpu :)

Thanks again for sharing your work Chen :)