{"action":"created","issue":{"url":"https://api.github.com/repos/lisa-lab/pylearn2/issues/1347","labels_url":"https://api.github.com/repos/lisa-lab/pylearn2/issues/1347/labels{/name}","comments_url":"https://api.github.com/repos/lisa-lab/pylearn2/issues/1347/comments","events_url":"https://api.github.com/repos/lisa-lab/pylearn2/issues/1347/events","html_url":"https://github.com/lisa-lab/pylearn2/pull/1347","id":54401996,"number":1347,"title":"fix Reshape error and \"Input dimension mis-match\" when using Softmax layer with binary_target_dim > 1","user":{"login":"minhlab","id":2816631,"avatar_url":"https://avatars.githubusercontent.com/u/2816631?v=3","gravatar_id":"","url":"https://api.github.com/users/minhlab","html_url":"https://github.com/minhlab","followers_url":"https://api.github.com/users/minhlab/followers","following_url":"https://api.github.com/users/minhlab/following{/other_user}","gists_url":"https://api.github.com/users/minhlab/gists{/gist_id}","starred_url":"https://api.github.com/users/minhlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minhlab/subscriptions","organizations_url":"https://api.github.com/users/minhlab/orgs","repos_url":"https://api.github.com/users/minhlab/repos","events_url":"https://api.github.com/users/minhlab/events{/privacy}","received_events_url":"https://api.github.com/users/minhlab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-15T01:36:06Z","updated_at":"2015-01-28T21:31:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/lisa-lab/pylearn2/pulls/1347","html_url":"https://github.com/lisa-lab/pylearn2/pull/1347","diff_url":"https://github.com/lisa-lab/pylearn2/pull/1347.diff","patch_url":"https://github.com/lisa-lab/pylearn2/pull/1347.patch"},"body":"Using `binary_target_dim` rather than 1 will result in these errors:\r\n\r\n````\r\nValueError: Input dimension mis-match. (input[0].shape[0] = 1968, input[2].shape[0] = 123)\r\nApply node that caused the error: Elemwise{Composite{[add(i0, mul(i1, i2))]}}[(0, 2)](Flatten{1}.0, TensorConstant{(1,) of 60000}, ARange.0)\r\nInputs types: [TensorType(int64, vector), TensorType(int64, (True,)), TensorType(int64, vector)]\r\nInputs shapes: [(1968,), (1,), (123,)]\r\nInputs strides: [(8,), (8,), (8,)]\r\nInputs scalar values: ['not scalar', array([60000]), 'not scalar']\r\n````\r\n\r\nand\r\n\r\n````\r\nValueError: total size of new array must be unchanged\r\nApply node that caused the error: Reshape{1}(monitoring_targets, MakeVector.0)\r\nInputs types: [TensorType(int64, matrix), TensorType(int64, vector)]\r\nInputs shapes: [(10, 16), (1,)]\r\nInputs strides: [(136, 8), (8,)]\r\nInputs scalar values: ['not scalar', array([10])]\r\n````\r\n\r\nThis commit fixes them.\r\n"},"comment":{"url":"https://api.github.com/repos/lisa-lab/pylearn2/issues/comments/71920417","html_url":"https://github.com/lisa-lab/pylearn2/pull/1347#issuecomment-71920417","issue_url":"https://api.github.com/repos/lisa-lab/pylearn2/issues/1347","id":71920417,"user":{"login":"lamblin","id":178249,"avatar_url":"https://avatars.githubusercontent.com/u/178249?v=3","gravatar_id":"","url":"https://api.github.com/users/lamblin","html_url":"https://github.com/lamblin","followers_url":"https://api.github.com/users/lamblin/followers","following_url":"https://api.github.com/users/lamblin/following{/other_user}","gists_url":"https://api.github.com/users/lamblin/gists{/gist_id}","starred_url":"https://api.github.com/users/lamblin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamblin/subscriptions","organizations_url":"https://api.github.com/users/lamblin/orgs","repos_url":"https://api.github.com/users/lamblin/repos","events_url":"https://api.github.com/users/lamblin/events{/privacy}","received_events_url":"https://api.github.com/users/lamblin/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T21:31:37Z","updated_at":"2015-01-28T21:31:37Z","body":"Thanks!"}}