{"action":"created","issue":{"url":"https://api.github.com/repos/Lasagne/Lasagne/issues/712","repository_url":"https://api.github.com/repos/Lasagne/Lasagne","labels_url":"https://api.github.com/repos/Lasagne/Lasagne/issues/712/labels{/name}","comments_url":"https://api.github.com/repos/Lasagne/Lasagne/issues/712/comments","events_url":"https://api.github.com/repos/Lasagne/Lasagne/issues/712/events","html_url":"https://github.com/Lasagne/Lasagne/issues/712","id":162626045,"number":712,"title":"How to get the gradient( dL/dw) of the first hiden layer during training?","user":{"login":"zzd1992","id":11853283,"avatar_url":"https://avatars.githubusercontent.com/u/11853283?v=3","gravatar_id":"","url":"https://api.github.com/users/zzd1992","html_url":"https://github.com/zzd1992","followers_url":"https://api.github.com/users/zzd1992/followers","following_url":"https://api.github.com/users/zzd1992/following{/other_user}","gists_url":"https://api.github.com/users/zzd1992/gists{/gist_id}","starred_url":"https://api.github.com/users/zzd1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzd1992/subscriptions","organizations_url":"https://api.github.com/users/zzd1992/orgs","repos_url":"https://api.github.com/users/zzd1992/repos","events_url":"https://api.github.com/users/zzd1992/events{/privacy}","received_events_url":"https://api.github.com/users/zzd1992/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-28T08:06:23Z","updated_at":"2016-06-28T16:09:51Z","closed_at":"2016-06-28T16:09:51Z","body":""},"comment":{"url":"https://api.github.com/repos/Lasagne/Lasagne/issues/comments/229098646","html_url":"https://github.com/Lasagne/Lasagne/issues/712#issuecomment-229098646","issue_url":"https://api.github.com/repos/Lasagne/Lasagne/issues/712","id":229098646,"user":{"login":"f0k","id":629706,"avatar_url":"https://avatars.githubusercontent.com/u/629706?v=3","gravatar_id":"","url":"https://api.github.com/users/f0k","html_url":"https://github.com/f0k","followers_url":"https://api.github.com/users/f0k/followers","following_url":"https://api.github.com/users/f0k/following{/other_user}","gists_url":"https://api.github.com/users/f0k/gists{/gist_id}","starred_url":"https://api.github.com/users/f0k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f0k/subscriptions","organizations_url":"https://api.github.com/users/f0k/orgs","repos_url":"https://api.github.com/users/f0k/repos","events_url":"https://api.github.com/users/f0k/events{/privacy}","received_events_url":"https://api.github.com/users/f0k/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T16:09:51Z","updated_at":"2016-06-28T16:09:51Z","body":"Just add it as an additional output of your `train_fn` function:\r\n```\r\ntrain_fn = theano.function([input_var, target_var],\r\n                           [loss, theano.grad(loss, wrt=layer1.W)],\r\n                           updates=updates)\r\n```\r\nThis assumes `layer1` is the first hidden layer. If you didn't keep it around when building the network, you can get it as `lasagne.layers.get_all_layers(network)[1]` (`[0]` would be the input layer, so `[1]` is the first layer processing the input).\r\n\r\nIn future, please post such questions on our mailing list, this issue tracker is meant to be reserved for bug reports and feature discussions. Thank you!"}}
{"actor":{"display_login":"f0k"}}