{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/4787","repository_url":"https://api.github.com/repos/BVLC/caffe","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/4787/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/4787/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/4787/events","html_url":"https://github.com/BVLC/caffe/issues/4787","id":180226798,"number":4787,"title":"Training a network using an existing model for weights - do I need to rename the last layer if data is similar?","user":{"login":"GeorgiAngelov","id":3877350,"avatar_url":"https://avatars.githubusercontent.com/u/3877350?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgiAngelov","html_url":"https://github.com/GeorgiAngelov","followers_url":"https://api.github.com/users/GeorgiAngelov/followers","following_url":"https://api.github.com/users/GeorgiAngelov/following{/other_user}","gists_url":"https://api.github.com/users/GeorgiAngelov/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgiAngelov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgiAngelov/subscriptions","organizations_url":"https://api.github.com/users/GeorgiAngelov/orgs","repos_url":"https://api.github.com/users/GeorgiAngelov/repos","events_url":"https://api.github.com/users/GeorgiAngelov/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgiAngelov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-30T06:03:48Z","updated_at":"2016-10-05T04:00:17Z","closed_at":null,"body":"So I've read in a few places that the last layer of the network needs to be renamed to re-initialize the weights. However, do I still need to do that if I my data is a subset of the classes that the network was trained on ?\r\nSay the model was trained on 'ducks', 'dogs', 'cats', 'mice' and I am now further training it on 'cats' so it can do a better job of detecting cats in weird scenarios. Do I need to now still rename the last layer(s) ?"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/251576326","html_url":"https://github.com/BVLC/caffe/issues/4787#issuecomment-251576326","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/4787","id":251576326,"user":{"login":"GeorgiAngelov","id":3877350,"avatar_url":"https://avatars.githubusercontent.com/u/3877350?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgiAngelov","html_url":"https://github.com/GeorgiAngelov","followers_url":"https://api.github.com/users/GeorgiAngelov/followers","following_url":"https://api.github.com/users/GeorgiAngelov/following{/other_user}","gists_url":"https://api.github.com/users/GeorgiAngelov/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgiAngelov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgiAngelov/subscriptions","organizations_url":"https://api.github.com/users/GeorgiAngelov/orgs","repos_url":"https://api.github.com/users/GeorgiAngelov/repos","events_url":"https://api.github.com/users/GeorgiAngelov/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgiAngelov/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T04:00:17Z","updated_at":"2016-10-05T04:00:17Z","body":"@wk910930, yeah technically it should now only contain 1 classes. I wasn't sure if it will make sense to reduce the number of classes the network can recognize even though I no longer will provide input training data for them. Basically, what would give me the best recognition for a single class:\r\n\r\nOption #1. Modify the last fully-connected-layer to my number of classes + rename it.\r\nOption #2. Keep the existing class #, even though I'll now only use and train for 1 of the classes going forward.\r\nOption #3. Keep the existing class #, but rename the last fully-connected layer to re-initialize the weights.\r\n\r\nWhat are your thoughts ?"}}
{"actor":{"display_login":"GeorgiAngelov"}}