{"action":"opened","issue":{"url":"https://api.github.com/repos/fmassa/optimize-net/issues/27","repository_url":"https://api.github.com/repos/fmassa/optimize-net","labels_url":"https://api.github.com/repos/fmassa/optimize-net/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/fmassa/optimize-net/issues/27/comments","events_url":"https://api.github.com/repos/fmassa/optimize-net/issues/27/events","html_url":"https://github.com/fmassa/optimize-net/issues/27","id":189604072,"number":27,"title":"Unwritable object problem","user":{"login":"shane-huang","id":1995599,"avatar_url":"https://avatars.githubusercontent.com/u/1995599?v=3","gravatar_id":"","url":"https://api.github.com/users/shane-huang","html_url":"https://github.com/shane-huang","followers_url":"https://api.github.com/users/shane-huang/followers","following_url":"https://api.github.com/users/shane-huang/following{/other_user}","gists_url":"https://api.github.com/users/shane-huang/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-huang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-huang/subscriptions","organizations_url":"https://api.github.com/users/shane-huang/orgs","repos_url":"https://api.github.com/users/shane-huang/repos","events_url":"https://api.github.com/users/shane-huang/events{/privacy}","received_events_url":"https://api.github.com/users/shane-huang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-16T06:23:44Z","updated_at":"2016-11-16T06:23:44Z","closed_at":null,"body":"I tried this optimization on googlenet (https://github.com/soumith/imagenet-multiGPU.torch) training with SpatialBatchNormalization. I added the optnet.optimizeMemory in trainBatch (where a single mini-batch is trained), right after inputs are transferred to GPU and before SGD started. Just got below error. \r\n\r\n`\r\n/home/user/shane/torch/install/bin/luajit: ...er/shane/torch/install/share/lua/5.1/threads/threads.lua:179: [thread 28 endcallback] /home/user/shane/torch/install/share/lua/5.1/torch/File.lua:141: Unwritable object <function> at <?>.<?>.modules.1.<?>.modules.1.<?>.updateGradInput.basefunc.find.get.finders.1.fallback.getConvolutionDescriptor_ffi.ffi.abi\r\nstack traceback:\r\n        [C]: in function 'error'\r\n        /home/user/shane/torch/install/share/lua/5.1/torch/File.lua:141: in function 'writeObject'\r\n...\r\n        ...e/user/shane/torch/install/share/lua/5.1/optnet/init.lua:399: in function 'optimizeMemory'\r\n`\r\nIt seems there's sth. not serializable.  I saw someone met similar problem but problem is with cudnn v3. I am using cudnn v5.  I already set the mode=training and inplace=true as instructions."}}
{"actor":{"display_login":"shane-huang"}}