{"action":"created","issue":{"url":"https://api.github.com/repos/vlfeat/matconvnet/issues/276","labels_url":"https://api.github.com/repos/vlfeat/matconvnet/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/vlfeat/matconvnet/issues/276/comments","events_url":"https://api.github.com/repos/vlfeat/matconvnet/issues/276/events","html_url":"https://github.com/vlfeat/matconvnet/issues/276","id":109680380,"number":276,"title":"cnn_train on CPU","user":{"login":"NiclasWad","id":14963811,"avatar_url":"https://avatars.githubusercontent.com/u/14963811?v=3","gravatar_id":"","url":"https://api.github.com/users/NiclasWad","html_url":"https://github.com/NiclasWad","followers_url":"https://api.github.com/users/NiclasWad/followers","following_url":"https://api.github.com/users/NiclasWad/following{/other_user}","gists_url":"https://api.github.com/users/NiclasWad/gists{/gist_id}","starred_url":"https://api.github.com/users/NiclasWad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NiclasWad/subscriptions","organizations_url":"https://api.github.com/users/NiclasWad/orgs","repos_url":"https://api.github.com/users/NiclasWad/repos","events_url":"https://api.github.com/users/NiclasWad/events{/privacy}","received_events_url":"https://api.github.com/users/NiclasWad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-04T13:05:43Z","updated_at":"2015-10-05T07:58:12Z","closed_at":null,"body":"\r\nHi,\r\n\r\nI have donwloaded matconvnet and trying to run the example cnn_mnist I get error in cnn_train because numberlabs and labnumber are undefined in my matlab. I do not have parallel toolbox. The example runs if I define the variables numberlabs = 1; and labnumber = 1;. What do I need to do to be able to run the example on a single CPU?\r\n\r\n/Niclas\r\n"},"comment":{"url":"https://api.github.com/repos/vlfeat/matconvnet/issues/comments/145455842","html_url":"https://github.com/vlfeat/matconvnet/issues/276#issuecomment-145455842","issue_url":"https://api.github.com/repos/vlfeat/matconvnet/issues/276","id":145455842,"user":{"login":"vedaldi","id":81309,"avatar_url":"https://avatars.githubusercontent.com/u/81309?v=3","gravatar_id":"","url":"https://api.github.com/users/vedaldi","html_url":"https://github.com/vedaldi","followers_url":"https://api.github.com/users/vedaldi/followers","following_url":"https://api.github.com/users/vedaldi/following{/other_user}","gists_url":"https://api.github.com/users/vedaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/vedaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vedaldi/subscriptions","organizations_url":"https://api.github.com/users/vedaldi/orgs","repos_url":"https://api.github.com/users/vedaldi/repos","events_url":"https://api.github.com/users/vedaldi/events{/privacy}","received_events_url":"https://api.github.com/users/vedaldi/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T07:58:12Z","updated_at":"2015-10-05T07:58:12Z","body":"Hi, one possibility would be to create two functions labindex and numblabs that take no arguments and return 1. If you make them visible in MATLAB’s path, that should take care of the problem.\n\n> On 5 Oct 2015, at 07:14, NiclasWad <notifications@github.com> wrote:\n> \n> Hi Andrea,\n> \n> Thanks for prompt reply. Yes, the example code cnn_mnist runs as it should. I consider my solution a temporary solution since I defined the variables in every place where numlabs and labnumber is used. It should be possible to do this once early in the code but I am not sure how to do it. How do you check if the toolbox is installed and how do you define a global variable that is seen by all other functions?\n> \n> /Niclas\n> \n> —\n> Reply to this email directly or view it on GitHub <https://github.com/vlfeat/matconvnet/issues/276#issuecomment-145440530>.\n> \n\n"}}