{"action":"closed","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/3170","repository_url":"https://api.github.com/repos/dmlc/mxnet","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/3170/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/3170/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/3170/events","html_url":"https://github.com/dmlc/mxnet/issues/3170","id":173715369,"number":3170,"title":"[R] Reduce memory consumption when training with big matrix","user":{"login":"hoaphumanoid","id":3491412,"avatar_url":"https://avatars.githubusercontent.com/u/3491412?v=3","gravatar_id":"","url":"https://api.github.com/users/hoaphumanoid","html_url":"https://github.com/hoaphumanoid","followers_url":"https://api.github.com/users/hoaphumanoid/followers","following_url":"https://api.github.com/users/hoaphumanoid/following{/other_user}","gists_url":"https://api.github.com/users/hoaphumanoid/gists{/gist_id}","starred_url":"https://api.github.com/users/hoaphumanoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoaphumanoid/subscriptions","organizations_url":"https://api.github.com/users/hoaphumanoid/orgs","repos_url":"https://api.github.com/users/hoaphumanoid/repos","events_url":"https://api.github.com/users/hoaphumanoid/events{/privacy}","received_events_url":"https://api.github.com/users/hoaphumanoid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dmlc/mxnet/labels/R-Package","name":"R-Package","color":"006b75"}],"state":"closed","locked":false,"assignee":{"login":"thirdwing","id":1547093,"avatar_url":"https://avatars.githubusercontent.com/u/1547093?v=3","gravatar_id":"","url":"https://api.github.com/users/thirdwing","html_url":"https://github.com/thirdwing","followers_url":"https://api.github.com/users/thirdwing/followers","following_url":"https://api.github.com/users/thirdwing/following{/other_user}","gists_url":"https://api.github.com/users/thirdwing/gists{/gist_id}","starred_url":"https://api.github.com/users/thirdwing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thirdwing/subscriptions","organizations_url":"https://api.github.com/users/thirdwing/orgs","repos_url":"https://api.github.com/users/thirdwing/repos","events_url":"https://api.github.com/users/thirdwing/events{/privacy}","received_events_url":"https://api.github.com/users/thirdwing/received_events","type":"User","site_admin":false},"assignees":[{"login":"thirdwing","id":1547093,"avatar_url":"https://avatars.githubusercontent.com/u/1547093?v=3","gravatar_id":"","url":"https://api.github.com/users/thirdwing","html_url":"https://github.com/thirdwing","followers_url":"https://api.github.com/users/thirdwing/followers","following_url":"https://api.github.com/users/thirdwing/following{/other_user}","gists_url":"https://api.github.com/users/thirdwing/gists{/gist_id}","starred_url":"https://api.github.com/users/thirdwing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thirdwing/subscriptions","organizations_url":"https://api.github.com/users/thirdwing/orgs","repos_url":"https://api.github.com/users/thirdwing/repos","events_url":"https://api.github.com/users/thirdwing/events{/privacy}","received_events_url":"https://api.github.com/users/thirdwing/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-08-29T07:45:28Z","updated_at":"2016-09-05T19:30:53Z","closed_at":"2016-09-05T19:30:53Z","body":"I have a matrix that occupies 68.4 Gb. When I feed that into the training function the size doubles and I get an out of memory.\r\n```R\r\ndevices <- list(mx.gpu(0), mx.gpu(1), mx.gpu(2), mx.gpu(3))\r\nbatch_size <- 128*4\r\nmodel <- mx.model.FeedForward.create(symbol=network, \r\n                                     X=data_train$X, \r\n                                     y=data_train$y, \r\n                                     ctx=devices,\r\n                                     num.round=number_epochs, \r\n                                     array.batch.size=batch_size,\r\n                                     learning.rate=learning_rate, \r\n                                     momentum=momentum,  \r\n                                     eval.metric=mx.metric.accuracy, \r\n                                     wd=0.00001,\r\n                                     epoch.end.callback=mx.callback.save.checkpoint(prefix = \"crepe_\"),\r\n                                     batch.end.callback=mx.callback.log.train.metric(100)\r\n                                     )\r\n```\r\n\r\nAny idea how to reduce the size? Or can I use any other training method to reduce memory consumption?\r\n\r\n"}}
{"actor":{"display_login":"hoaphumanoid"}}