{"action":"created","issue":{"url":"https://api.github.com/repos/nyanp/tiny-cnn/issues/48","repository_url":"https://api.github.com/repos/nyanp/tiny-cnn","labels_url":"https://api.github.com/repos/nyanp/tiny-cnn/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/nyanp/tiny-cnn/issues/48/comments","events_url":"https://api.github.com/repos/nyanp/tiny-cnn/issues/48/events","html_url":"https://github.com/nyanp/tiny-cnn/issues/48","id":112078391,"number":48,"title":"may consume too much memory when creating big network","user":{"login":"shenck0","id":14921896,"avatar_url":"https://avatars.githubusercontent.com/u/14921896?v=3","gravatar_id":"","url":"https://api.github.com/users/shenck0","html_url":"https://github.com/shenck0","followers_url":"https://api.github.com/users/shenck0/followers","following_url":"https://api.github.com/users/shenck0/following{/other_user}","gists_url":"https://api.github.com/users/shenck0/gists{/gist_id}","starred_url":"https://api.github.com/users/shenck0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shenck0/subscriptions","organizations_url":"https://api.github.com/users/shenck0/orgs","repos_url":"https://api.github.com/users/shenck0/repos","events_url":"https://api.github.com/users/shenck0/events{/privacy}","received_events_url":"https://api.github.com/users/shenck0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-19T06:04:33Z","updated_at":"2016-02-12T03:23:29Z","closed_at":null,"body":"Hi, I'm trying to create a NN like :\r\n``` C++\r\n\tnn << convolutional_layer<tan_h>(320, 320, 33, 1, 20)\r\n\t\t<< average_pooling_layer<tan_h>(288, 288, 20, 2)\r\n\t\t<< convolutional_layer<tan_h>(144, 144, 15, 20, 30)\r\n\t\t<< average_pooling_layer<tan_h>(130, 130, 30, 2)\r\n\t\t<< convolutional_layer<tan_h>(65, 65, 6, 30, 20)\r\n\t\t<< max_pooling_layer<tan_h>(60, 60, 20, 3)\r\n\t\t<< fully_connected_layer<tan_h>(8000, 558);\r\n```\r\nbut I got \"vector subscript out of range\" error, it seems like that index3d<T>.size() doesn't return right value when in_ is defined as index3d< unsigned short > type, so I change code:\r\n``` C++\r\n\"typedef unsigned short layer_size_t;\" => \"typedef unsigned int layer_size_t;\"\r\n```\r\nbut this time, the program is eating memory until whole memory was occupied. (i'm using a 8G RAM)\r\nI think the implement of partial_connected_layer.h is straightforward and intelligible but it may cosume too much memory when creating a big network because of \"io/wi/wo_connections\".\r\n"},"comment":{"url":"https://api.github.com/repos/nyanp/tiny-cnn/issues/comments/183162935","html_url":"https://github.com/nyanp/tiny-cnn/issues/48#issuecomment-183162935","issue_url":"https://api.github.com/repos/nyanp/tiny-cnn/issues/48","id":183162935,"user":{"login":"nyanp","id":378738,"avatar_url":"https://avatars.githubusercontent.com/u/378738?v=3","gravatar_id":"","url":"https://api.github.com/users/nyanp","html_url":"https://github.com/nyanp","followers_url":"https://api.github.com/users/nyanp/followers","following_url":"https://api.github.com/users/nyanp/following{/other_user}","gists_url":"https://api.github.com/users/nyanp/gists{/gist_id}","starred_url":"https://api.github.com/users/nyanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyanp/subscriptions","organizations_url":"https://api.github.com/users/nyanp/orgs","repos_url":"https://api.github.com/users/nyanp/repos","events_url":"https://api.github.com/users/nyanp/events{/privacy}","received_events_url":"https://api.github.com/users/nyanp/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T03:23:29Z","updated_at":"2016-02-12T03:23:29Z","body":"Now implementation of convolutional_layer changed. Memory consumption is independent from sizeof(layer_size_t) and reasonably small :)"}}