{"action":"created","issue":{"url":"https://api.github.com/repos/crowsonkb/style_transfer/issues/5","repository_url":"https://api.github.com/repos/crowsonkb/style_transfer","labels_url":"https://api.github.com/repos/crowsonkb/style_transfer/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/crowsonkb/style_transfer/issues/5/comments","events_url":"https://api.github.com/repos/crowsonkb/style_transfer/issues/5/events","html_url":"https://github.com/crowsonkb/style_transfer/issues/5","id":182664876,"number":5,"title":"Error when trying to use ResNet model","user":{"login":"ProGamerGov","id":10626398,"avatar_url":"https://avatars.githubusercontent.com/u/10626398?v=3","gravatar_id":"","url":"https://api.github.com/users/ProGamerGov","html_url":"https://github.com/ProGamerGov","followers_url":"https://api.github.com/users/ProGamerGov/followers","following_url":"https://api.github.com/users/ProGamerGov/following{/other_user}","gists_url":"https://api.github.com/users/ProGamerGov/gists{/gist_id}","starred_url":"https://api.github.com/users/ProGamerGov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProGamerGov/subscriptions","organizations_url":"https://api.github.com/users/ProGamerGov/orgs","repos_url":"https://api.github.com/users/ProGamerGov/repos","events_url":"https://api.github.com/users/ProGamerGov/events{/privacy}","received_events_url":"https://api.github.com/users/ProGamerGov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-13T00:12:31Z","updated_at":"2016-10-13T04:47:25Z","closed_at":null,"body":"The command used:\r\n\r\n`./style_transfer.py inputs/hoovertowernight.jpg inputs/starry_night.jpg --net-type resnet  --model resnet_50_1by2_nsfw.caffemodel --tile-size 1920 -s 400 800 -i 150 -cw 0.1 -pw 5 --content-layers conv4_1 conv4_2 conv4_3 conv4_4 --style-layers conv1_1 pool1 pool2 pool3 pool4 2>&1 | tee ~/mylog.log`\r\n\r\n\r\nThe terminal output:\r\n\r\n```\r\nLoading VGG_ILSVRC_19_layers.caffemodel.\r\n[libprotobuf ERROR google/protobuf/text_format.cc:296] Error parsing text-format caffe.NetParameter: 2:1: Invalid control characters encountered in text.\r\n[libprotobuf ERROR google/protobuf/text_format.cc:296] Error parsing text-format caffe.NetParameter: 2:29: Interpreting non ascii codepoint 162.\r\n[libprotobuf ERROR google/protobuf/text_format.cc:296] Error parsing text-format caffe.NetParameter: 2:29: Message type \"caffe.NetParameter\" has no field named \"ResNet_50_1by2_inplace_nsfw\".\r\nWARNING: Logging before InitGoogleLogging() is written to STDERR\r\nF1013 00:07:33.795737  1351 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: resnet_50_1by2_nsfw.caffemodel\r\n*** Check failure stack trace: ***\r\n```\r\n\r\nThe model was from here: https://github.com/yahoo/open_nsfw. The train_val info can be found here: https://github.com/yahoo/open_nsfw/issues/8 \r\n\r\nI experienced this error on the style_tranfer AMI."},"comment":{"url":"https://api.github.com/repos/crowsonkb/style_transfer/issues/comments/253413579","html_url":"https://github.com/crowsonkb/style_transfer/issues/5#issuecomment-253413579","issue_url":"https://api.github.com/repos/crowsonkb/style_transfer/issues/5","id":253413579,"user":{"login":"crowsonkb","id":4657022,"avatar_url":"https://avatars.githubusercontent.com/u/4657022?v=3","gravatar_id":"","url":"https://api.github.com/users/crowsonkb","html_url":"https://github.com/crowsonkb","followers_url":"https://api.github.com/users/crowsonkb/followers","following_url":"https://api.github.com/users/crowsonkb/following{/other_user}","gists_url":"https://api.github.com/users/crowsonkb/gists{/gist_id}","starred_url":"https://api.github.com/users/crowsonkb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowsonkb/subscriptions","organizations_url":"https://api.github.com/users/crowsonkb/orgs","repos_url":"https://api.github.com/users/crowsonkb/repos","events_url":"https://api.github.com/users/crowsonkb/events{/privacy}","received_events_url":"https://api.github.com/users/crowsonkb/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T04:47:25Z","updated_at":"2016-10-13T04:47:25Z","body":"I think for this model you have to use the `conv_` layers instead of `scale_` or `bn_`. If you look at the output of --list-layers (you can just add that flag to style_transfer.py to print the layers then exit, it's like --help), some of the layers will be 1D (like `(1000,)`) and some will be 3D (like `(512, 28, 28)`). Only the 3D layers can be used. This should really be documented and also have an informative error message. The 'out of range' error is due to it trying to read the size of the second dimension when it doesn't exist for that layer."}}
{"actor":{"display_login":"crowsonkb"}}