{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/3555","repository_url":"https://api.github.com/repos/dmlc/mxnet","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/3555/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/3555/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/3555/events","html_url":"https://github.com/dmlc/mxnet/issues/3555","id":183583497,"number":3555,"title":"how to just train final layer","user":{"login":"umichyiwan","id":14853238,"avatar_url":"https://avatars.githubusercontent.com/u/14853238?v=3","gravatar_id":"","url":"https://api.github.com/users/umichyiwan","html_url":"https://github.com/umichyiwan","followers_url":"https://api.github.com/users/umichyiwan/followers","following_url":"https://api.github.com/users/umichyiwan/following{/other_user}","gists_url":"https://api.github.com/users/umichyiwan/gists{/gist_id}","starred_url":"https://api.github.com/users/umichyiwan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umichyiwan/subscriptions","organizations_url":"https://api.github.com/users/umichyiwan/orgs","repos_url":"https://api.github.com/users/umichyiwan/repos","events_url":"https://api.github.com/users/umichyiwan/events{/privacy}","received_events_url":"https://api.github.com/users/umichyiwan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-18T03:45:30Z","updated_at":"2016-10-19T14:41:48Z","closed_at":null,"body":"I would like to train final layer with previous layer fixed. Can I do something like this?\r\nin symbol file\r\n```\r\nfc6_weight = mx.sym.Variable('fc6_weight', attr={'lr_mult':'0'})\r\nfc6_bias = mx.sym.Variable('fc6_bias', attr={'lr_mult':'0'})\r\nmyfc7_weight = mx.sym.Variable('myfc7_weight')\r\nmyfc7_bias = mx.sym.Variable('myfc7_bias')\r\nmyfc7 = mx.symbol.FullyConnected(data=relu6, num_hidden=256, weight=myfc7_weight, bias=myfc7_bias)\r\nmyrelu7 = mx.symbol.Activation(data=myfc7, act_type=\"relu\")\r\n```\r\nin the main function\r\n```\r\nmodel = mx.model.FeedForward(\r\n            ctx=self.ctx,\r\n            symbol=get_net(),\r\n            num_epoch=self.num_epoch,\r\n            learning_rate=0.001,\r\n            momentum=0.9,\r\n            wd=0.001,\r\n            initializer=mx.init.Xavier(factor_type=\"in\", magnitude=2.34),\r\n            begin_epoch=begin_epoch,\r\n)\r\n```\r\nNow what will the learning_rate be in layer 6 and layer 7?\r\nThere might be 3 cases:\r\nlayer 6 and 7 both are 0.001\r\nlayer 6 is 0 while layer 7 is 0.001\r\nlayer 6 is 0 while layer 7 is 0.01(default value)\r\nWhich one is correct?"},"comment":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/comments/254833808","html_url":"https://github.com/dmlc/mxnet/issues/3555#issuecomment-254833808","issue_url":"https://api.github.com/repos/dmlc/mxnet/issues/3555","id":254833808,"user":{"login":"starimpact","id":2155428,"avatar_url":"https://avatars.githubusercontent.com/u/2155428?v=3","gravatar_id":"","url":"https://api.github.com/users/starimpact","html_url":"https://github.com/starimpact","followers_url":"https://api.github.com/users/starimpact/followers","following_url":"https://api.github.com/users/starimpact/following{/other_user}","gists_url":"https://api.github.com/users/starimpact/gists{/gist_id}","starred_url":"https://api.github.com/users/starimpact/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starimpact/subscriptions","organizations_url":"https://api.github.com/users/starimpact/orgs","repos_url":"https://api.github.com/users/starimpact/repos","events_url":"https://api.github.com/users/starimpact/events{/privacy}","received_events_url":"https://api.github.com/users/starimpact/received_events","type":"User","site_admin":false},"created_at":"2016-10-19T14:41:48Z","updated_at":"2016-10-19T14:41:48Z","body":"this is easy to do: just split it into two nets. the first one is your pre trained layers. and the second one is your last layer. the input of the second one is the output of the first one. it is easy to implemented."}}
{"actor":{"display_login":"starimpact"}}