{"action":"created","issue":{"url":"https://api.github.com/repos/vlfeat/matconvnet/issues/662","repository_url":"https://api.github.com/repos/vlfeat/matconvnet","labels_url":"https://api.github.com/repos/vlfeat/matconvnet/issues/662/labels{/name}","comments_url":"https://api.github.com/repos/vlfeat/matconvnet/issues/662/comments","events_url":"https://api.github.com/repos/vlfeat/matconvnet/issues/662/events","html_url":"https://github.com/vlfeat/matconvnet/issues/662","id":172168077,"number":662,"title":"How to concatenate two Pretrained Dagnn network?","user":{"login":"yushuinanrong","id":17254532,"avatar_url":"https://avatars.githubusercontent.com/u/17254532?v=3","gravatar_id":"","url":"https://api.github.com/users/yushuinanrong","html_url":"https://github.com/yushuinanrong","followers_url":"https://api.github.com/users/yushuinanrong/followers","following_url":"https://api.github.com/users/yushuinanrong/following{/other_user}","gists_url":"https://api.github.com/users/yushuinanrong/gists{/gist_id}","starred_url":"https://api.github.com/users/yushuinanrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yushuinanrong/subscriptions","organizations_url":"https://api.github.com/users/yushuinanrong/orgs","repos_url":"https://api.github.com/users/yushuinanrong/repos","events_url":"https://api.github.com/users/yushuinanrong/events{/privacy}","received_events_url":"https://api.github.com/users/yushuinanrong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-19T16:19:42Z","updated_at":"2016-08-22T10:37:52Z","closed_at":null,"body":"Hi all,\r\n\r\nI have two pretrained Dagnn network and I want to create a new network that fuse the two pretrained networks in fully connected layers. The fusion can be simply element-wise summation operation. \r\nI know how to define the structure from scratch. But if I want to utilize the pretrained weights, how should I do?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vlfeat/matconvnet/issues/comments/241375297","html_url":"https://github.com/vlfeat/matconvnet/issues/662#issuecomment-241375297","issue_url":"https://api.github.com/repos/vlfeat/matconvnet/issues/662","id":241375297,"user":{"login":"omair-kg","id":10205648,"avatar_url":"https://avatars.githubusercontent.com/u/10205648?v=3","gravatar_id":"","url":"https://api.github.com/users/omair-kg","html_url":"https://github.com/omair-kg","followers_url":"https://api.github.com/users/omair-kg/followers","following_url":"https://api.github.com/users/omair-kg/following{/other_user}","gists_url":"https://api.github.com/users/omair-kg/gists{/gist_id}","starred_url":"https://api.github.com/users/omair-kg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omair-kg/subscriptions","organizations_url":"https://api.github.com/users/omair-kg/orgs","repos_url":"https://api.github.com/users/omair-kg/repos","events_url":"https://api.github.com/users/omair-kg/events{/privacy}","received_events_url":"https://api.github.com/users/omair-kg/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T10:37:52Z","updated_at":"2016-08-22T10:37:52Z","body":"One way that I'm doing it is by first giving the layers, parameters and variables in both networks unique names (so there is no conflict when they are merged). Afterwards I do this:\r\n\r\ntemp_1 = net._1saveobj();\r\ntemp_2 = net_2.saveobj();\r\n\r\ntemp.layers = [temp_1.layers temp_2.layers];\r\ntemp.params = [temp_1.params temp_2.params];\r\ntemp.vars = [temp_1.vars temp_2.vars];\r\ntemp.meta = temp_1.meta;\r\n\r\nnet = dagnn.DagNN.loadobj(temp);"}}
{"actor":{"display_login":"omair-kg"}}