{"action":"opened","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/1076","labels_url":"https://api.github.com/repos/fchollet/keras/issues/1076/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/1076/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/1076/events","html_url":"https://github.com/fchollet/keras/issues/1076","id":118782240,"number":1076,"title":"mnist_irnn.py","user":{"login":"lxc-xx","id":861323,"avatar_url":"https://avatars.githubusercontent.com/u/861323?v=3","gravatar_id":"","url":"https://api.github.com/users/lxc-xx","html_url":"https://github.com/lxc-xx","followers_url":"https://api.github.com/users/lxc-xx/followers","following_url":"https://api.github.com/users/lxc-xx/following{/other_user}","gists_url":"https://api.github.com/users/lxc-xx/gists{/gist_id}","starred_url":"https://api.github.com/users/lxc-xx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxc-xx/subscriptions","organizations_url":"https://api.github.com/users/lxc-xx/orgs","repos_url":"https://api.github.com/users/lxc-xx/repos","events_url":"https://api.github.com/users/lxc-xx/events{/privacy}","received_events_url":"https://api.github.com/users/lxc-xx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-25T08:04:49Z","updated_at":"2015-11-25T08:04:49Z","closed_at":null,"body":"Not sure if it is due to my personal setting or it is a general issue.\r\n\r\nI can run the example mnist_irnn.py using CPU.\r\nWhen I run it using gnu, I got this error message:\r\n```\r\nubuntu@ip-172-31-2-0:~/keras/examples$ python mnist_irnn.py\r\nUsing gpu device 0: GRID K520 (CNMeM is disabled)\r\nX_train shape: (60000, 784, 1)\r\n60000 train samples\r\n10000 test samples\r\nEvaluate IRNN...\r\nTrain on 60000 samples, validate on 10000 samples\r\nEpoch 1/200\r\nTraceback (most recent call last):\r\n  File \"mnist_irnn.py\", line 69, in <module>\r\n    show_accuracy=True, verbose=1, validation_data=(X_test, Y_test))\r\n  File \"build/bdist.linux-x86_64/egg/keras/models.py\", line 495, in fit\r\n  File \"build/bdist.linux-x86_64/egg/keras/models.py\", line 216, in _fit\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py\", line 871, in __call__\r\n    storage_map=getattr(self.fn, 'storage_map', None))\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/link.py\", line 314, in raise_with_op\r\n    reraise(exc_type, exc_value, exc_trace)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py\", line 859, in __call__\r\n    outputs = self.fn()\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/scan_module/scan_op.py\", line 963, in rval\r\n    r = p(n, [x[0] for x in i], o)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/scan_module/scan_op.py\", line 952, in <lambda>\r\n    self, node)\r\n  File \"theano/scan_module/scan_perform.pyx\", line 389, in theano.scan_module.scan_perform.perform (/home/ubuntu/.theano/compiledir_Linux-3.13--generic-x86_64-with-Ubuntu-14.04-trusty-x86_64-2.7.6-64/scan_perform/mod.cpp:3936)\r\nAttributeError: 'CudaNdarray' object has no attribute 'data'\r\nApply node that caused the error: forall_inplace,gpu,grad_of_scan_fn}(Elemwise{minimum,no_inplace}.0, GpuSubtensor{int64:int64:int64}.0, Subtensor{int64:int64:int64}.0, GpuSubtensor{int64:int64:int64}.0, GpuSubtensor{::int64}.0, Elemwise{minimum,no_inplace}.0, Elemwise{minimum,no_inplace}.0, <CudaNdarrayType(float32, matrix)>, GpuDimShuffle{1,0}.0)\r\nToposort index: 247\r\nInputs types: [TensorType(int64, scalar), CudaNdarrayType(float32, 3D), TensorType(int8, (False, False, True)), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, 3D), TensorType(int64, scalar), TensorType(int64, scalar), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix)]\r\nInputs shapes: [(), (784, 32, 100), (784, 32, 1), (784, 32, 100), (785, 32, 100), (), (), (100, 100), (100, 100)]\r\nInputs strides: [(), (-3200, 100, 1), (-32, 1, 1), (-3200, 100, 1), (-3200, 100, 1), (), (), (100, 1), (1, 100)]\r\nInputs values: [array(784), 'not shown', 'not shown', 'not shown', 'not shown', array(784), array(784), 'not shown', 'not shown']\r\nOutputs clients: [[], [GpuSubtensor{::int64}(forall_inplace,gpu,grad_of_scan_fn}.1, Constant{-1})], [GpuReshape{2}(forall_inplace,gpu,grad_of_scan_fn}.2, MakeVector{dtype='int64'}.0)]]\r\n\r\nHINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.\r\nHINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.\r\n```\r\n\r\nAccording to the output, I re-run the code using:\r\n```\r\nTHEANO_FLAGS='optimizer=None' python mnist_irnn.py\r\n```\r\nThen there is no error message but very slow.\r\n\r\nAnyone has similar issues?"}}