{"action":"closed","issue":{"url":"https://api.github.com/repos/Lasagne/Recipes/issues/9","labels_url":"https://api.github.com/repos/Lasagne/Recipes/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/Lasagne/Recipes/issues/9/comments","events_url":"https://api.github.com/repos/Lasagne/Recipes/issues/9/events","html_url":"https://github.com/Lasagne/Recipes/issues/9","id":101496173,"number":9,"title":"Shape mismatch using the CPU at the ImageNet Pretrained Network (VGG_S).ipynb","user":{"login":"pfeodrippe","id":2124834,"avatar_url":"https://avatars.githubusercontent.com/u/2124834?v=3","gravatar_id":"","url":"https://api.github.com/users/pfeodrippe","html_url":"https://github.com/pfeodrippe","followers_url":"https://api.github.com/users/pfeodrippe/followers","following_url":"https://api.github.com/users/pfeodrippe/following{/other_user}","gists_url":"https://api.github.com/users/pfeodrippe/gists{/gist_id}","starred_url":"https://api.github.com/users/pfeodrippe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfeodrippe/subscriptions","organizations_url":"https://api.github.com/users/pfeodrippe/orgs","repos_url":"https://api.github.com/users/pfeodrippe/repos","events_url":"https://api.github.com/users/pfeodrippe/events{/privacy}","received_events_url":"https://api.github.com/users/pfeodrippe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-17T19:47:38Z","updated_at":"2015-08-19T23:54:00Z","closed_at":"2015-08-19T23:54:00Z","body":"I'm having a mismatch problem when trying to set the weights at the model.\r\n\r\nAt first it was using the cuda implementation, but my computer doesn't have a cuda-enabled GPU, and then I've changed the conv model to the cpu implementation (Conv2DLayer).\r\n\r\nMaybe can't I use \"pad=1\" in a Conv2DLayer?\r\n\r\n\r\n```python\r\nfrom lasagne.layers import InputLayer, DenseLayer, DropoutLayer, Conv2DLayer as ConvLayer\r\n# from lasagne.layers.dnn import Conv2DDNNLayer as ConvLayer\r\n```\r\n\r\n```python\r\nIn [5]: ### Load the model parameters and metadata\r\nimport pickle\r\n\r\nmodel = pickle.load(open('vgg_cnn_s.pkl'))\r\nCLASSES = model['synset words']\r\nMEAN_IMAGE = model['mean image']\r\n\r\nlasagne.layers.set_all_param_values(output_layer, model['values'])\r\n\r\n\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-6-ec94c9846d22> in <module>()\r\n      5 MEAN_IMAGE = model['mean image']\r\n      6 \r\n----> 7 lasagne.layers.set_all_param_values(output_layer, model['values'])\r\n\r\n/Users/mac/Sites/python/Diseaselyzer/venv/lib/python2.7/site-packages/lasagne/layers/helper.pyc in set_all_param_values(layer, values, **tags)\r\n    450             raise ValueError(\"mismatch: parameter has shape %r but value to \"\r\n    451                              \"set has shape %r\" %\r\n--> 452                              (p.get_value().shape, v.shape))\r\n    453         else:\r\n    454             p.set_value(v)\r\n\r\nValueError: mismatch: parameter has shape (12800, 4096) but value to set has shape (18432, 4096)\r\n\r\n``` \r\n\r\nThanks in advance \\o\r\n"}}