{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/332","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/332/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/332/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/332/events","html_url":"https://github.com/dmlc/mxnet/issues/332","id":112278171,"number":332,"title":"[R] Vote for Memory Layout","user":{"login":"tqchen","id":2577440,"avatar_url":"https://avatars.githubusercontent.com/u/2577440?v=3","gravatar_id":"","url":"https://api.github.com/users/tqchen","html_url":"https://github.com/tqchen","followers_url":"https://api.github.com/users/tqchen/followers","following_url":"https://api.github.com/users/tqchen/following{/other_user}","gists_url":"https://api.github.com/users/tqchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tqchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqchen/subscriptions","organizations_url":"https://api.github.com/users/tqchen/orgs","repos_url":"https://api.github.com/users/tqchen/repos","events_url":"https://api.github.com/users/tqchen/events{/privacy}","received_events_url":"https://api.github.com/users/tqchen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dmlc/mxnet/labels/discussion","name":"discussion","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-10-20T03:22:24Z","updated_at":"2015-10-25T04:01:10Z","closed_at":"2015-10-20T17:44:53Z","body":"I just noticed this, and I think we might want to change. Currently python and C++ use row major ordering while Julia/R use column major ordering. In current R package, the behavior is doing col/row order conversion when going from R's native array to internal one, and vise versa. \r\n\r\nIn Julia pkg  @pluskid used a another [convention](https://github.com/dmlc/MXNet.jl/blob/master/src/ndarray.jl#L25) Which seems to be more natural. So shape is reversed, while the other things do not change.\r\n\r\nI like to call for a vote between the R core devs, @thirdwing @hetong007 . Others are welcomed to participate. Whether we want to make R pkg follow the Julia way. So the memory layout of image is\r\n (width, height, channel, num), and memory layout of normal input examples (num_feature, num_inst) by default \r\n\r\nOptions:\r\n- 1. Do col/row major conversion. So a c++ array (num, channel, height, width) remains (num, channel, height, width) in R\r\n   - This is the current way in R. This keeps arrays consistent, but layout not \"native\"\r\n- 2. Do not do row/col major conversion a c++ array (num, channel, height, width) becomes  (width, height, channel, num)\r\n    - This is the current way in Mocha.jl\r\n    - This layout might be more natural for R users, as R's images are loaded in this layout normally."},"comment":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/comments/150890074","html_url":"https://github.com/dmlc/mxnet/issues/332#issuecomment-150890074","issue_url":"https://api.github.com/repos/dmlc/mxnet/issues/332","id":150890074,"user":{"login":"tqchen","id":2577440,"avatar_url":"https://avatars.githubusercontent.com/u/2577440?v=3","gravatar_id":"","url":"https://api.github.com/users/tqchen","html_url":"https://github.com/tqchen","followers_url":"https://api.github.com/users/tqchen/followers","following_url":"https://api.github.com/users/tqchen/following{/other_user}","gists_url":"https://api.github.com/users/tqchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tqchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqchen/subscriptions","organizations_url":"https://api.github.com/users/tqchen/orgs","repos_url":"https://api.github.com/users/tqchen/repos","events_url":"https://api.github.com/users/tqchen/events{/privacy}","received_events_url":"https://api.github.com/users/tqchen/received_events","type":"User","site_admin":false},"created_at":"2015-10-25T04:01:10Z","updated_at":"2015-10-25T04:01:10Z","body":"Yes, that is what I mean, if user need to implement a visualization of nets in the native side, he need to remember to reverse the shape"}}