{"action":"created","issue":{"url":"https://api.github.com/repos/DmitryUlyanov/texture_nets/issues/61","repository_url":"https://api.github.com/repos/DmitryUlyanov/texture_nets","labels_url":"https://api.github.com/repos/DmitryUlyanov/texture_nets/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/DmitryUlyanov/texture_nets/issues/61/comments","events_url":"https://api.github.com/repos/DmitryUlyanov/texture_nets/issues/61/events","html_url":"https://github.com/DmitryUlyanov/texture_nets/issues/61","id":194253710,"number":61,"title":"Encounter error when using model \"pyramid\" in training and testing","user":{"login":"michaelhuang74","id":23154573,"avatar_url":"https://avatars.githubusercontent.com/u/23154573?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelhuang74","html_url":"https://github.com/michaelhuang74","followers_url":"https://api.github.com/users/michaelhuang74/followers","following_url":"https://api.github.com/users/michaelhuang74/following{/other_user}","gists_url":"https://api.github.com/users/michaelhuang74/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelhuang74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelhuang74/subscriptions","organizations_url":"https://api.github.com/users/michaelhuang74/orgs","repos_url":"https://api.github.com/users/michaelhuang74/repos","events_url":"https://api.github.com/users/michaelhuang74/events{/privacy}","received_events_url":"https://api.github.com/users/michaelhuang74/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-08T05:57:29Z","updated_at":"2016-12-10T02:45:43Z","closed_at":null,"body":"No error when using model \"johnson\" in training. However, when try to use model \"pyramid\" in training, an error occurred. \r\n\r\nFollowing is the command:\r\nth train.lua -style_image style/witch.jpg -style_size 600 -checkpoints_path checkpoint/ -checkpoints_name witch.sw3.p. -style_weight 3 -model pyramid -num_iterations 10000 -batch_size 2\r\n\r\nFollowing is the output on the stdout:\r\ntorch.display not found. unable to plot\r\nUsing TV loss with weight       1e-06\r\n[libprotobuf WARNING google/protobuf/io/coded_stream.cc:505] Reading dangerously large protocol message.  If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.\r\n[libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192\r\nSuccessfully loaded data/pretrained/VGG_ILSVRC_19_layers.caffemodel\r\nconv1_1: 64 3 3 3\r\nconv1_2: 64 64 3 3\r\nconv2_1: 128 64 3 3\r\nconv2_2: 128 128 3 3\r\nconv3_1: 256 128 3 3\r\nconv3_2: 256 256 3 3\r\nconv3_3: 256 256 3 3\r\nconv3_4: 256 256 3 3\r\nconv4_1: 512 256 3 3\r\nconv4_2: 512 512 3 3\r\nconv4_3: 512 512 3 3\r\nconv4_4: 512 512 3 3\r\nconv5_1: 512 512 3 3\r\nconv5_2: 512 512 3 3\r\nconv5_3: 512 512 3 3\r\nconv5_4: 512 512 3 3\r\nfc6: 1 1 25088 4096\r\nfc7: 1 1 4096 4096\r\nfc8: 1 1 4096 1000\r\nSetting up texture layer        4       :       relu1_2\r\nSetting up texture layer        9       :       relu2_2\r\nSetting up texture layer        14      :       relu3_2\r\nSetting up content layer        23      :       relu4_2\r\nSetting up texture layer        23      :       relu4_2\r\n        Optimize        \r\n/home/mqhuang/torch/install/bin/luajit: /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:67: \r\nIn 1 module of nn.Sequential:\r\nIn 1 module of nn.Concat:\r\nIn 12 module of nn.Sequential:\r\n/home/mqhuang/torch/install/share/lua/5.1/torch/Tensor.lua:457: expecting a contiguous tensor\r\nstack traceback:\r\n        [C]: in function 'assert'\r\n        /home/mqhuang/torch/install/share/lua/5.1/torch/Tensor.lua:457: in function 'view'\r\n        ./InstanceNormalization.lua:71: in function 'updateGradInput'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Module.lua:31: in function </home/mqhuang/torch/install/share/lua/5.1/nn/Module.lua:29>\r\n        [C]: in function 'xpcall'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Sequential.lua:84: in function </home/mqhuang/torch/install/share/lua/5.1/nn/Sequential.lua:78>\r\n        [C]: in function 'xpcall'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:91: in function </home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:47>\r\n        [C]: in function 'xpcall'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Sequential.lua:88: in function 'backward'\r\n        train.lua:150: in function 'opfunc'\r\n        /home/mqhuang/torch/install/share/lua/5.1/optim/adam.lua:37: in function 'optim_method'\r\n        train.lua:175: in main chunk\r\n        [C]: in function 'dofile'\r\n        ...uang/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk\r\n        [C]: at 0x004065d0\r\n\r\nWARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above.\r\nstack traceback:\r\n        [C]: in function 'error'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Sequential.lua:88: in function 'backward'\r\n        train.lua:150: in function 'opfunc'\r\n        /home/mqhuang/torch/install/share/lua/5.1/optim/adam.lua:37: in function 'optim_method'\r\n        train.lua:175: in main chunk\r\n        [C]: in function 'dofile'\r\n        ...uang/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk\r\n        [C]: at 0x004065d0\r\n\r\nThe OS is ubuntu 14.04. I have one Tesla K40 and one Titan X-Pascal in the system. The error happens to both GPUs. \r\n\r\nAny idea is appreciated."},"comment":{"url":"https://api.github.com/repos/DmitryUlyanov/texture_nets/issues/comments/266173678","html_url":"https://github.com/DmitryUlyanov/texture_nets/issues/61#issuecomment-266173678","issue_url":"https://api.github.com/repos/DmitryUlyanov/texture_nets/issues/61","id":266173678,"user":{"login":"michaelhuang74","id":23154573,"avatar_url":"https://avatars.githubusercontent.com/u/23154573?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelhuang74","html_url":"https://github.com/michaelhuang74","followers_url":"https://api.github.com/users/michaelhuang74/followers","following_url":"https://api.github.com/users/michaelhuang74/following{/other_user}","gists_url":"https://api.github.com/users/michaelhuang74/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelhuang74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelhuang74/subscriptions","organizations_url":"https://api.github.com/users/michaelhuang74/orgs","repos_url":"https://api.github.com/users/michaelhuang74/repos","events_url":"https://api.github.com/users/michaelhuang74/events{/privacy}","received_events_url":"https://api.github.com/users/michaelhuang74/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T02:45:43Z","updated_at":"2016-12-10T02:45:43Z","body":"I generated a couple of .t7 files using the model \"pyramid\". The size of .t7 files using model \"johnson\" is typically 20 MB. However, the size of .t7 files using model \"pyramid\" is around 7.5 MB.\r\n\r\nFor the training using both models, the parameters are the same as following.\r\n-image_size 512, -style_size 600, -style_weight 3, -content_weight 1,...\r\n\r\nWhen I use test.lua to generate the stylized image, there is no error when using .t7 files with \"johnson\" model. However, I encounter the following error when using .t7 files with \"pyramid\".\r\n\r\nCommand: th test.lua -input_image inputimage/obama.jpg -model_t7 checkpoint/witch.sw3.mp.3000.t7 -save_path outputimage/obama.witch.sw3.mp.3000.jpg \r\n\r\n/home/mqhuang/torch/install/bin/luajit: /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:67: \r\nIn 1 module of nn.Sequential:\r\nIn 1 module of nn.Concat:\r\nIn 1 module of nn.Sequential:\r\nIn 1 module of nn.Concat:\r\nIn 1 module of nn.Sequential:\r\nIn 1 module of nn.Concat:\r\nIn 1 module of nn.Sequential:\r\nIn 1 module of nn.Concat:\r\nIn 1 module of nn.Sequential:\r\n/home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:27: bad argument #1 to 'copy' (sizes do not match at /tmp/luarocks_cutorch-scm-1-6069/cutorch/lib/THC/THCTensorCopy.cu:31)\r\nstack traceback:\r\n        [C]: in function 'copy'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:27: in function </home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:9>\r\n        [C]: in function 'xpcall'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function </home/mqhuang/torch/install/share/lua/5.1/nn/Sequential.lua:41>\r\n        [C]: in function 'xpcall'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:14: in function </home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:9>\r\n        [C]: in function 'xpcall'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'\r\n        ...\r\n        [C]: in function 'xpcall'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:14: in function </home/mqhuang/torch/install/share/lua/5.1/nn/Concat.lua:9>\r\n        [C]: in function 'xpcall'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'\r\n        merge.lua:41: in main chunk\r\n        [C]: in function 'dofile'\r\n        ...uang/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk\r\n        [C]: at 0x00406670\r\n\r\nWARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above.\r\nstack traceback:\r\n        [C]: in function 'error'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'\r\n        /home/mqhuang/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'\r\n        merge.lua:41: in main chunk\r\n        [C]: in function 'dofile'\r\n        ...uang/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk\r\n        [C]: at 0x00406670\r\n\r\nAnyone has the same experience? How to resolve it? Thanks.\r\n\r\n"}}
{"actor":{"display_login":"michaelhuang74"}}