{"action":"created","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/3756","labels_url":"https://api.github.com/repos/Theano/Theano/issues/3756/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/3756/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/3756/events","html_url":"https://github.com/Theano/Theano/issues/3756","id":120693935,"number":3756,"title":"problems with fast_compile","user":{"login":"stevenxxiu","id":2058940,"avatar_url":"https://avatars.githubusercontent.com/u/2058940?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenxxiu","html_url":"https://github.com/stevenxxiu","followers_url":"https://api.github.com/users/stevenxxiu/followers","following_url":"https://api.github.com/users/stevenxxiu/following{/other_user}","gists_url":"https://api.github.com/users/stevenxxiu/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenxxiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenxxiu/subscriptions","organizations_url":"https://api.github.com/users/stevenxxiu/orgs","repos_url":"https://api.github.com/users/stevenxxiu/repos","events_url":"https://api.github.com/users/stevenxxiu/events{/privacy}","received_events_url":"https://api.github.com/users/stevenxxiu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-07T04:04:10Z","updated_at":"2015-12-16T13:48:12Z","closed_at":"2015-12-16T13:48:12Z","body":"Commit https://github.com/Theano/Theano/commit/09d58a97726098231bb8e75464a9dedb3b1f9194 introduces the following:\r\n\r\n     optdb.register('specialize_device', gof.EquilibriumDB(),\r\n    -               48.6, 'fast_run')  # must be after gpu stuff at 48.5\r\n    +               48.6, 'fast_compile', 'fast_run')  # must be after gpu stuff at 48.5\r\n\r\nFor my code this gives the following stacktrace:\r\n\r\n      ... (my code)\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\lasagne\\updates.py\", line 498, in adadelta\r\n        grads = get_or_compute_grads(loss_or_grads, params)\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\lasagne\\updates.py\", line 110, in get_or_compute_grads\r\n        return theano.grad(loss_or_grads, params)\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 561, in grad\r\n        grad_dict, wrt, cost_name)\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 1324, in _populate_grad_dict\r\n        rval = [access_grad_cache(elem) for elem in wrt]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 1324, in <listcomp>\r\n        rval = [access_grad_cache(elem) for elem in wrt]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 1279, in access_grad_cache\r\n        term = access_term_cache(node)[idx]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 973, in access_term_cache\r\n        output_grads = [access_grad_cache(var) for var in node.outputs]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 973, in <listcomp>\r\n        output_grads = [access_grad_cache(var) for var in node.outputs]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 1279, in access_grad_cache\r\n        term = access_term_cache(node)[idx]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 973, in access_term_cache\r\n        output_grads = [access_grad_cache(var) for var in node.outputs]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 973, in <listcomp>\r\n        output_grads = [access_grad_cache(var) for var in node.outputs]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 1279, in access_grad_cache\r\n        term = access_term_cache(node)[idx]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 973, in access_term_cache\r\n        output_grads = [access_grad_cache(var) for var in node.outputs]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 973, in <listcomp>\r\n        output_grads = [access_grad_cache(var) for var in node.outputs]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 1279, in access_grad_cache\r\n        term = access_term_cache(node)[idx]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 973, in access_term_cache\r\n        output_grads = [access_grad_cache(var) for var in node.outputs]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 973, in <listcomp>\r\n        output_grads = [access_grad_cache(var) for var in node.outputs]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 1279, in access_grad_cache\r\n        term = access_term_cache(node)[idx]\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\gradient.py\", line 1113, in access_term_cache\r\n        input_grads = node.op.grad(inputs, new_output_grads)\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\tensor\\elemwise.py\", line 412, in grad\r\n        return [DimShuffle(gz.type.broadcastable, grad_order)(\r\n      File \"C:\\Program Files\\Python35\\lib\\site-packages\\theano\\tensor\\elemwise.py\", line 164, in __init__\r\n        (input_broadcastable, new_order))\r\n    ValueError: ('You cannot drop a non-broadcastable dimension.', ((False, False, False, False), (0, 1, 3)))\r\n\r\n, where it was working before. Does anyone know the cause? I'll try and upload a more reproducable example later."},"comment":{"url":"https://api.github.com/repos/Theano/Theano/issues/comments/165110581","html_url":"https://github.com/Theano/Theano/issues/3756#issuecomment-165110581","issue_url":"https://api.github.com/repos/Theano/Theano/issues/3756","id":165110581,"user":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T13:48:12Z","updated_at":"2015-12-16T13:48:12Z","body":"This should be fixed by gh-3774 in master. Thanks for the report and good example."}}