{"action":"created","issue":{"url":"https://api.github.com/repos/baidu-research/warp-ctc/issues/22","labels_url":"https://api.github.com/repos/baidu-research/warp-ctc/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/baidu-research/warp-ctc/issues/22/comments","events_url":"https://api.github.com/repos/baidu-research/warp-ctc/issues/22/events","html_url":"https://github.com/baidu-research/warp-ctc/issues/22","id":128572888,"number":22,"title":"Gradient output from batch using torch binding","user":{"login":"SeanNaren","id":6707363,"avatar_url":"https://avatars.githubusercontent.com/u/6707363?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanNaren","html_url":"https://github.com/SeanNaren","followers_url":"https://api.github.com/users/SeanNaren/followers","following_url":"https://api.github.com/users/SeanNaren/following{/other_user}","gists_url":"https://api.github.com/users/SeanNaren/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanNaren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanNaren/subscriptions","organizations_url":"https://api.github.com/users/SeanNaren/orgs","repos_url":"https://api.github.com/users/SeanNaren/repos","events_url":"https://api.github.com/users/SeanNaren/events{/privacy}","received_events_url":"https://api.github.com/users/SeanNaren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-25T16:18:00Z","updated_at":"2016-01-25T18:20:55Z","closed_at":null,"body":"Sorry if this is answered elsewhere or blatantly obvious, but I'm not entirely sure of the formatting of the gradients after carrying out a batch like below:\r\n```\r\nth>acts = torch.Tensor({{0,0,0,0,0},{1,2,3,4,5},{-5,-4,-3,-2,-1},\r\n                        {0,0,0,0,0},{6,7,8,9,10},{-10,-9,-8,-7,-6},\r\n                        {0,0,0,0,0},{11,12,13,14,15},{-15,-14,-13,-12,-11}}):cuda()\r\nth>labels = {{1}, {3,3}, {2,3}}\r\nth>sizes = {1,3,3}\r\nth>grads = torch.Tensor(acts:size())\r\nth>gpu_ctc(acts, grads, labels, sizes)\r\n\r\n{\r\n  1 : 1.6094379425049\r\n  2 : 7.355742931366\r\n  3 : 4.938850402832\r\n}\r\n```\r\n\r\nShould we expect the gradients to also be in column major formatting like how we put our multiple sequences in (i.e we would need to reverse the batching steps we did for the activation sequence with the gradients)? Thanks!\r\n"},"comment":{"url":"https://api.github.com/repos/baidu-research/warp-ctc/issues/comments/174609602","html_url":"https://github.com/baidu-research/warp-ctc/issues/22#issuecomment-174609602","issue_url":"https://api.github.com/repos/baidu-research/warp-ctc/issues/22","id":174609602,"user":{"login":"dxyzab","id":1844552,"avatar_url":"https://avatars.githubusercontent.com/u/1844552?v=3","gravatar_id":"","url":"https://api.github.com/users/dxyzab","html_url":"https://github.com/dxyzab","followers_url":"https://api.github.com/users/dxyzab/followers","following_url":"https://api.github.com/users/dxyzab/following{/other_user}","gists_url":"https://api.github.com/users/dxyzab/gists{/gist_id}","starred_url":"https://api.github.com/users/dxyzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dxyzab/subscriptions","organizations_url":"https://api.github.com/users/dxyzab/orgs","repos_url":"https://api.github.com/users/dxyzab/repos","events_url":"https://api.github.com/users/dxyzab/events{/privacy}","received_events_url":"https://api.github.com/users/dxyzab/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T18:20:55Z","updated_at":"2016-01-25T18:20:55Z","body":"The gradients will be in the same format as the incoming activations: each gradient matrix entry will be dCTC/da_{ij} where a_{ij} is an incoming activation to CTC. "}}