{"action":"created","issue":{"url":"https://api.github.com/repos/pdollar/edges/issues/10","repository_url":"https://api.github.com/repos/pdollar/edges","labels_url":"https://api.github.com/repos/pdollar/edges/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/pdollar/edges/issues/10/comments","events_url":"https://api.github.com/repos/pdollar/edges/issues/10/events","html_url":"https://github.com/pdollar/edges/issues/10","id":171561175,"number":10,"title":"edgesTrain parfor issue and issues following the solution","user":{"login":"tteresi7","id":21071925,"avatar_url":"https://avatars.githubusercontent.com/u/21071925?v=3","gravatar_id":"","url":"https://api.github.com/users/tteresi7","html_url":"https://github.com/tteresi7","followers_url":"https://api.github.com/users/tteresi7/followers","following_url":"https://api.github.com/users/tteresi7/following{/other_user}","gists_url":"https://api.github.com/users/tteresi7/gists{/gist_id}","starred_url":"https://api.github.com/users/tteresi7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tteresi7/subscriptions","organizations_url":"https://api.github.com/users/tteresi7/orgs","repos_url":"https://api.github.com/users/tteresi7/repos","events_url":"https://api.github.com/users/tteresi7/events{/privacy}","received_events_url":"https://api.github.com/users/tteresi7/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-17T02:35:31Z","updated_at":"2016-08-17T03:06:00Z","closed_at":"2016-08-17T03:06:00Z","body":"> ??? Error: File: edgesTrain.m Line: 157 Column: 18\r\nThe variable eBins in a parfor cannot be classified.\r\n See Parallel for Loops in MATLAB, \"Overview\".\r\n\r\nI am getting this error while trying to run edgesDemo.  It looks like the error stems from using two different indices within the loop.  The variables need sliced to operate correctly.\r\n\r\nSwitching to something like this:\r\n\r\n`parfor i=1:nTrees*nNodes\r\n    if(model.child(i) || model.nSegs(i)==1), continue;end %#ok<PFBNS>\r\n    E=gradientMag(single(model.segs(:,:,i)))>.01; E0=0;\r\n    sliceBins = eBins{i}; sliceBnds = eBnds(i);\r\n    for j=1:nBnds, %eBins{i,j}=uint16(find(E & ~E0)'-1); E0=E;\r\n        %eBnds(i,j)=length(eBins{i,j}); E=convTri(single(E),1)>.01; end\r\n        sliceBins{j} = unit16(find(E&~E0)'-1); E0=E;\r\n        sliceBnds(j)=length(sliceBins{j}); E=convTri(single(E),1)>0.1; end`\r\n\r\nSolves the issue.\r\n\r\nEDIT:  Solved the issue that results from the solution of this issue.  I needed to add the toolbox path back in because it got removed."},"comment":{"url":"https://api.github.com/repos/pdollar/edges/issues/comments/240301658","html_url":"https://github.com/pdollar/edges/issues/10#issuecomment-240301658","issue_url":"https://api.github.com/repos/pdollar/edges/issues/10","id":240301658,"user":{"login":"pdollar","id":699682,"avatar_url":"https://avatars.githubusercontent.com/u/699682?v=3","gravatar_id":"","url":"https://api.github.com/users/pdollar","html_url":"https://github.com/pdollar","followers_url":"https://api.github.com/users/pdollar/followers","following_url":"https://api.github.com/users/pdollar/following{/other_user}","gists_url":"https://api.github.com/users/pdollar/gists{/gist_id}","starred_url":"https://api.github.com/users/pdollar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdollar/subscriptions","organizations_url":"https://api.github.com/users/pdollar/orgs","repos_url":"https://api.github.com/users/pdollar/repos","events_url":"https://api.github.com/users/pdollar/events{/privacy}","received_events_url":"https://api.github.com/users/pdollar/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T03:06:00Z","updated_at":"2016-08-17T03:06:00Z","body":"I just tried running the code and it works fine. Are you using a really old version of Matlab? Anyway, worst case just remove parfor and run as regular for loop."}}
{"actor":{"display_login":"pdollar"}}