New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pygpu.gpuarray.GpuArrayException #5945
Comments
I have a different error message and it come from Keras and tell that there is missing information in the code you give:
Here is the Theano and Keras commit version that I tested:
Are you sure there isn't a Keras or Theano version installed in the user? That would cause different version to be used instead of the newly installed version. |
I removed all installed versions (python 2.7 and 3.5) of Theano, libgpuarray and Keras and made a clean install from the respective git repositories. But I ended up with the same error. |
Your error seems strange by the way as |
I think the problem as the other one is in keras that don't compute shape correctly. Make an issue on there repo and link to here. |
Can't reproduce the problem with the above code on: Python 3.6, Cuda 8.0, cudnn 5.1 (5110), theano-0.9, gpuarray and keras latest
|
Which version of libgpuarray did you install, and how? |
Here is my keras config file: { I still have the problem with an updated keras to 0bc8fac4463c68faa3b3c415c26eab02aa361fd5 |
I updated everything to the current versions: Keras==2.0.4
Theano==0.10.0.dev1
pygpu==0.6.5 (libgpuarray.so.2.1)
numpy==1.13.0.dev0+b297cb7 and still get a similar error: Using Theano backend.
Using cuDNN version 5110 on context None
Mapped name None to device cuda: GeForce GTX 1070 (0000:01:00.0)
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
conv2d_1 (Conv2D) (None, 4, 190, 290) 488
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 4, 95, 145) 0
_________________________________________________________________
flatten_1 (Flatten) (None, 55100) 0
_________________________________________________________________
dense_1 (Dense) (None, 128) 7052928
_________________________________________________________________
dense_2 (Dense) (None, 3) 387
=================================================================
Total params: 7,053,803
Trainable params: 7,053,803
Non-trainable params: 0
_________________________________________________________________
None
Epoch 1/10
Traceback (most recent call last):
File "newBackend.py", line 15, in <module>
model.fit( x, y)
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 866, in fit
initial_epoch=initial_epoch)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1504, in fit
initial_epoch=initial_epoch)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1156, in _fit_loop
outs = f(ins_batch)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 1196, in __call__
return self.function(*inputs)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 898, in __call__
storage_map=getattr(self.fn, 'storage_map', None))
File "/usr/local/lib/python2.7/dist-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 884, in __call__
self.fn() if output_subset is None else\
File "pygpu/gpuarray.pyx", line 683, in pygpu.gpuarray.pygpu_copy (pygpu/gpuarray.c:9990)
File "pygpu/gpuarray.pyx", line 396, in pygpu.gpuarray.array_copy (pygpu/gpuarray.c:7083)
pygpu.gpuarray.GpuArrayException:
Apply node that caused the error: GpuContiguous(InplaceGpuDimShuffle{3,2,0,1}.0)
Toposort index: 27
Inputs types: [GpuArrayType<None>(float32, 4D)]
Inputs shapes: [(4, 1, 11, 11)]
Inputs strides: [(4, 9223372036854775807, 176, 16)]
Inputs values: ['not shown']
Outputs clients: [[Shape(GpuContiguous.0), Shape_i{3}(GpuContiguous.0), Shape_i{2}(GpuContiguous.0), Shape_i{0}(GpuContiguous.0), GpuDnnConv{algo='small', inplace=True}(GpuContiguous.0, GpuContiguous.0, GpuAllocEmpty{dtype='float32', context_name=None}.0, GpuDnnConvDesc{border_mode='valid', subsample=(1, 1), dilation=(1, 1), conv_mode='conv', precision='float32'}.0, Constant{1.0}, Constant{0.0})]] My keras.json looks like following: {
"image_data_format": "channels_first",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "theano"
} My .theanorc: [cuda]
root = /usr/local/cuda-8.0
[global]
floatX=float32
device=cuda
[nvcc]
flags=-D_FORCE_INLINES
[lib]
cnmem = 0.
[dnn]
enabled = True
include_path=/usr/local/cuda-8.0/include
library_path=/usr/local/cuda-8.0/lib64/ |
What do you mean by libgpuarray.so.2.1? Can you check what is your latest version of pygpu? pygpu.version. It should be 0.6.5. It give better error in many cases. If you use it, it seem we need to add a better error for your case. |
pygpu==0.6.5 |
I guess the issue is triggered by:
i.e., a "strange" stride on a dimension of length 1. |
numpy==1.13.0.dev0+b297cb7 |
@lamblin you were right. It was indeed related to the numpy version. I removed the dev-version and installed the default version with pip: numpy==1.12.1 Problem solved! Nevertheless, when the default version of numpy is updated to 1.13, the problem might reoccur! |
I think it is more a difference between released versions of NumPy and development ones. |
@jagiella |
Update Theano to the dev version to get rid of this warning.
The GPU speed up vs the CPU depend of the conv sizes. You can use the
dnn.conv.algo_bwd_data, dnn.conv.algo_bwd_filter and dnn.conv.algo_fwd to
change the convolution implementation and get bigger speed up. time_once
and guess_once are good values for those flags. time_once will make the
first call much slower, so remove it from your timing.
…On Mon, Jun 19, 2017 at 5:58 PM nikolay-256 ***@***.***> wrote:
jagiella
I'm install numpy==1.12.1, but problem not solved, i continue to have
notice
/python3.6/site-packages/theano/gpuarray/dnn.py:135: UserWarning: Your
cuDNN version is more recent than Theano. If you encounter problems, try
updating Theano or downgrading cuDNN to version 5.1.
But it is still faster than cpu in 3 times.
How many times faster do you have, without this notice?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5945 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALC-5WGiSoDpMMC9wpdIYDerOVmXdZGks5sFu8HgaJpZM4NcXmn>
.
|
Using keras/theano with the new gpuarray backend, the following error occured:
I updated Keras and Theano to the latest versions on both repositories:
Code to reproduce the problem:
The text was updated successfully, but these errors were encountered: