{"action":"created","issue":{"url":"https://api.github.com/repos/stanfordnlp/GloVe/issues/19","repository_url":"https://api.github.com/repos/stanfordnlp/GloVe","labels_url":"https://api.github.com/repos/stanfordnlp/GloVe/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/stanfordnlp/GloVe/issues/19/comments","events_url":"https://api.github.com/repos/stanfordnlp/GloVe/issues/19/events","html_url":"https://github.com/stanfordnlp/GloVe/issues/19","id":146138897,"number":19,"title":"a bug in the update loop in glove.c?","user":{"login":"ktrapeznikov","id":4052002,"avatar_url":"https://avatars.githubusercontent.com/u/4052002?v=3","gravatar_id":"","url":"https://api.github.com/users/ktrapeznikov","html_url":"https://github.com/ktrapeznikov","followers_url":"https://api.github.com/users/ktrapeznikov/followers","following_url":"https://api.github.com/users/ktrapeznikov/following{/other_user}","gists_url":"https://api.github.com/users/ktrapeznikov/gists{/gist_id}","starred_url":"https://api.github.com/users/ktrapeznikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktrapeznikov/subscriptions","organizations_url":"https://api.github.com/users/ktrapeznikov/orgs","repos_url":"https://api.github.com/users/ktrapeznikov/repos","events_url":"https://api.github.com/users/ktrapeznikov/events{/privacy}","received_events_url":"https://api.github.com/users/ktrapeznikov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-05T23:37:47Z","updated_at":"2016-04-06T01:34:22Z","closed_at":"2016-04-06T00:14:55Z","body":"perhaps a bug or clever regularization in lines 133 and 134? Are l1 and l2 supposed to be switched?\r\n```    C++\r\n        /* Adaptive gradient updates */\r\n        fdiff *= eta; // for ease in calculating gradient\r\n        real W_updates1_sum = 0;\r\n        real W_updates2_sum = 0;\r\n        for (b = 0; b < vector_size; b++) {\r\n            // learning rate times gradient for word vectors\r\n            temp1 = fdiff * W[b + l2];\r\n            temp2 = fdiff * W[b + l1];\r\n            // adaptive updates\r\n            W_updates1[b] = temp1 / sqrt(gradsq[b + l1]);\r\n            W_updates2[b] = temp2 / sqrt(gradsq[b + l2]);\r\n            W_updates1_sum += W_updates1[b];\r\n            W_updates2_sum += W_updates2[b];\r\n            gradsq[b + l1] += temp1 * temp1;\r\n            gradsq[b + l2] += temp2 * temp2;\r\n        }\r\n```"},"comment":{"url":"https://api.github.com/repos/stanfordnlp/GloVe/issues/comments/206066683","html_url":"https://github.com/stanfordnlp/GloVe/issues/19#issuecomment-206066683","issue_url":"https://api.github.com/repos/stanfordnlp/GloVe/issues/19","id":206066683,"user":{"login":"ktrapeznikov","id":4052002,"avatar_url":"https://avatars.githubusercontent.com/u/4052002?v=3","gravatar_id":"","url":"https://api.github.com/users/ktrapeznikov","html_url":"https://github.com/ktrapeznikov","followers_url":"https://api.github.com/users/ktrapeznikov/followers","following_url":"https://api.github.com/users/ktrapeznikov/following{/other_user}","gists_url":"https://api.github.com/users/ktrapeznikov/gists{/gist_id}","starred_url":"https://api.github.com/users/ktrapeznikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktrapeznikov/subscriptions","organizations_url":"https://api.github.com/users/ktrapeznikov/orgs","repos_url":"https://api.github.com/users/ktrapeznikov/repos","events_url":"https://api.github.com/users/ktrapeznikov/events{/privacy}","received_events_url":"https://api.github.com/users/ktrapeznikov/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T01:34:22Z","updated_at":"2016-04-06T01:34:22Z","body":"yeah this makes sense, its just chain rule.... \r\n d f(a^T b) /da = b*f'(a^Tb) and d f(a^T b) /db = a*f'(a^T b)"}}