To add as much info as I can to help

im on theano 0.9.0 (installed using bleeding edge instructions but version 
didnt change)
keras 2.0.4

Windows 10 build 1703, on a zbook studio 15 G3.

Quadro 1000M graphics card with 4GB of DDR5 memory

On Tuesday, May 2, 2017 at 8:16:41 AM UTC+8, Daniel Betteridge wrote:
>
> For me at least I was using the anaconda package, and followed 
> http://ankivil.com/installing-keras-theano-and-dependencies-on-windows-10/
>
> to upgrade to the theano bleeding edge, same error as 111Moderato
>
> On Tuesday, May 2, 2017 at 6:07:01 AM UTC+8, nouiz wrote:
>>
>> How did you install them?
>>
>> Le lun. 1 mai 2017 13:06, 111Moderato <[email protected]> a écrit :
>>
>>> Thanks for your reply. But I think I 'm using the latest version of them?
>>>
>>> 在 2017年5月1日星期一 UTC+8下午8:57:54,nouiz写道:
>>>>
>>>> I just tried and it worked. Can you update to Theano dev version and 
>>>> keras dev version? I used those version.
>>>>
>>>> On Mon, May 1, 2017 at 4:19 AM 111Moderato <[email protected]> wrote:
>>>>
>>> from keras.applications.vgg16 import VGG16
>>>>>
>>>>> model=VGG16(include_top=False, weights='imagenet', input_tensor=None, 
>>>>> input_shape=None, pooling=None, classes=1000)
>>>>> model.summary()
>>>>>
>>>>> I ran this code very successful on the CPU, but the error on the GPU 
>>>>> as follows:
>>>>>
>>>>> Using Theano backend.
>>>>> Using cuDNN version 5105 on context None
>>>>> Mapped name None to device cuda: GeForce GTX TITAN X (0000:02:00.0)
>>>>> Traceback (most recent call last):
>>>>>   File "/home/xy/workspace/MyProject/1.py", line 12, in <module>
>>>>>     model=VGG16(include_top=False, weights='imagenet', input_tensor=None, 
>>>>> input_shape=None, pooling=None, classes=1000)
>>>>>   File 
>>>>> "/usr/local/lib/python2.7/dist-packages/Keras-2.0.3-py2.7.egg/keras/applications/vgg16.py",
>>>>>  line 171, in VGG16
>>>>>     layer_utils.convert_all_kernels_in_model(model)
>>>>>   File 
>>>>> "/usr/local/lib/python2.7/dist-packages/Keras-2.0.3-py2.7.egg/keras/utils/layer_utils.py",
>>>>>  line 148, in convert_all_kernels_in_model
>>>>>     K.batch_set_value(to_assign)
>>>>>   File 
>>>>> "/usr/local/lib/python2.7/dist-packages/Keras-2.0.3-py2.7.egg/keras/backend/theano_backend.py",
>>>>>  line 1126, in batch_set_value
>>>>>     x.set_value(np.asarray(value, dtype=x.dtype))
>>>>>   File "/usr/local/lib/python2.7/dist-packages/theano/gpuarray/type.py", 
>>>>> line 637, in set_value
>>>>>     self.container.value = value
>>>>>   File "/usr/local/lib/python2.7/dist-packages/theano/gof/link.py", line 
>>>>> 477, in __set__
>>>>>     **kwargs)
>>>>>   File "/usr/local/lib/python2.7/dist-packages/theano/gpuarray/type.py", 
>>>>> line 296, in filter_inplace
>>>>>     old_data.write(data)
>>>>>   File "pygpu/gpuarray.pyx", line 1655, in pygpu.gpuarray.GpuArray.write 
>>>>> (pygpu/gpuarray.c:20879)
>>>>> ValueError: ('Destination GpuArray is not contiguous', 'Container name 
>>>>> "block1_conv1/kernel"')
>>>>>
>>>>> How can i solve it?
>>>>> my configuration is :
>>>>>
>>>>> ubuntu 14.04
>>>>> python 2.7
>>>>> theano 0.9.0
>>>>> keras  2.0.3
>>>>> cudnn 5.1
>>>>> cuda 7.5
>>>>>
>>>>> I tried to let VGG16's weights = None,also succeeded. So I guess the 
>>>>> data type of the weight is not compatible with the GPU. But I do not know 
>>>>> what to do with it.
>>>>>
>>>>>
>>>>> I mentioned the problem in the keras page, get the following answer 
>>>>> from the Owner:
>>>>>
>>>>> The error occurs when we attempt to set the value of a Theano variable 
>>>>> using a Numpy array, at line
>>>>> x.set_value(np.asarray(value, dtype=x.dtype))
>>>>>
>>>>> This appears to be a Theano issue, so you should ask on the Theano 
>>>>> mailing list / repo.
>>>>>
>>>>> -- 
>>>>>
>>>>> --- 
>>>>> 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.
>>>>>
>>>> -- 
>>>
>>> --- 
>>> 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.
>>>
>>

-- 

--- 
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.

Reply via email to