{"action":"created","issue":{"url":"https://api.github.com/repos/dnouri/nolearn/issues/199","labels_url":"https://api.github.com/repos/dnouri/nolearn/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/dnouri/nolearn/issues/199/comments","events_url":"https://api.github.com/repos/dnouri/nolearn/issues/199/events","html_url":"https://github.com/dnouri/nolearn/issues/199","id":127103538,"number":199,"title":"How to use L2 regularization for Neural Nets in Lasagne-Nolearn Framework","user":{"login":"avisekiit","id":12903678,"avatar_url":"https://avatars.githubusercontent.com/u/12903678?v=3","gravatar_id":"","url":"https://api.github.com/users/avisekiit","html_url":"https://github.com/avisekiit","followers_url":"https://api.github.com/users/avisekiit/followers","following_url":"https://api.github.com/users/avisekiit/following{/other_user}","gists_url":"https://api.github.com/users/avisekiit/gists{/gist_id}","starred_url":"https://api.github.com/users/avisekiit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avisekiit/subscriptions","organizations_url":"https://api.github.com/users/avisekiit/orgs","repos_url":"https://api.github.com/users/avisekiit/repos","events_url":"https://api.github.com/users/avisekiit/events{/privacy}","received_events_url":"https://api.github.com/users/avisekiit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-17T15:47:42Z","updated_at":"2016-01-22T17:54:01Z","closed_at":null,"body":"Hi All,\r\nI am implementing a CNN using Lasagne-Nolearn framework  A simple example is shown below.\r\n\r\nnet2 = NeuralNet(\r\n    layers=[\r\n        ('input', layers.InputLayer),\r\n        ('conv1', layers.Conv2DLayer),\r\n        ('pool1', layers.MaxPool2DLayer),\r\n        ('conv2', layers.Conv2DLayer),\r\n        ('pool2', layers.MaxPool2DLayer),\r\n        ('conv3', layers.Conv2DLayer),\r\n        ('pool3', layers.MaxPool2DLayer),\r\n        ('hidden4', layers.DenseLayer),\r\n        ('hidden5', layers.DenseLayer),\r\n        ('output', layers.DenseLayer),\r\n        ],\r\n    input_shape=(None, 1, 96, 96),\r\n    conv1_num_filters=32, conv1_filter_size=(3, 3), pool1_pool_size=(2, 2),\r\n    conv2_num_filters=64, conv2_filter_size=(2, 2), pool2_pool_size=(2, 2),\r\n    conv3_num_filters=128, conv3_filter_size=(2, 2), pool3_pool_size=(2, 2),\r\n    hidden4_num_units=500, hidden5_num_units=500,\r\n    output_num_units=30, output_nonlinearity=None,\r\n\r\n    update_learning_rate=0.01,\r\n    update_momentum=0.9,\r\n\r\n    regression=True,\r\n    max_epochs=1000,\r\n    verbose=1,\r\n    )\r\n#######\r\n\r\nHow can I incorporate L2 regularization under this framework?\r\n\r\n-Thanks\r\nAvisek"},"comment":{"url":"https://api.github.com/repos/dnouri/nolearn/issues/comments/173992022","html_url":"https://github.com/dnouri/nolearn/issues/199#issuecomment-173992022","issue_url":"https://api.github.com/repos/dnouri/nolearn/issues/199","id":173992022,"user":{"login":"BenjaminBossan","id":6229650,"avatar_url":"https://avatars.githubusercontent.com/u/6229650?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjaminBossan","html_url":"https://github.com/BenjaminBossan","followers_url":"https://api.github.com/users/BenjaminBossan/followers","following_url":"https://api.github.com/users/BenjaminBossan/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminBossan/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminBossan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminBossan/subscriptions","organizations_url":"https://api.github.com/users/BenjaminBossan/orgs","repos_url":"https://api.github.com/users/BenjaminBossan/repos","events_url":"https://api.github.com/users/BenjaminBossan/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminBossan/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T17:54:01Z","updated_at":"2016-01-22T17:54:01Z","body":"Adding `objective_l2=0.0001` to the network parameters should do the job."}}