{"action":"created","issue":{"url":"https://api.github.com/repos/beniz/deepdetect/issues/159","repository_url":"https://api.github.com/repos/beniz/deepdetect","labels_url":"https://api.github.com/repos/beniz/deepdetect/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/beniz/deepdetect/issues/159/comments","events_url":"https://api.github.com/repos/beniz/deepdetect/issues/159/events","html_url":"https://github.com/beniz/deepdetect/issues/159","id":166563942,"number":159,"title":"Error creating network","user":{"login":"neo01124","id":301640,"avatar_url":"https://avatars.githubusercontent.com/u/301640?v=3","gravatar_id":"","url":"https://api.github.com/users/neo01124","html_url":"https://github.com/neo01124","followers_url":"https://api.github.com/users/neo01124/followers","following_url":"https://api.github.com/users/neo01124/following{/other_user}","gists_url":"https://api.github.com/users/neo01124/gists{/gist_id}","starred_url":"https://api.github.com/users/neo01124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo01124/subscriptions","organizations_url":"https://api.github.com/users/neo01124/orgs","repos_url":"https://api.github.com/users/neo01124/repos","events_url":"https://api.github.com/users/neo01124/events{/privacy}","received_events_url":"https://api.github.com/users/neo01124/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/beniz/deepdetect/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-07-20T11:56:45Z","updated_at":"2016-08-11T13:29:09Z","closed_at":"2016-08-02T09:02:46Z","body":"I'm trying to use 'Supervised Semantics-preserving Deep Hashing' (48-bit SSDH) model as provided [here](https://github.com/kevinlin311tw/Caffe-DeepBinaryCode#resources). \r\n\r\nThe following files are used for network initialization (provided by the above repo):\r\nmen_ssdh.prototxt:\r\n\r\n> name: \"CaffeNet\"\r\n> input: \"data\"\r\n> input_shape {\r\n>   dim: 10\r\n>   dim: 3\r\n>   dim: 227\r\n>   dim: 227\r\n> }\r\n> layer {\r\n>   name: \"conv1\"\r\n>   type: \"Convolution\"\r\n>   bottom: \"data\"\r\n>   top: \"conv1\"\r\n>   convolution_param {\r\n>     num_output: 96\r\n>     kernel_size: 11\r\n>     stride: 4\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"relu1\"\r\n>   type: \"ReLU\"\r\n>   bottom: \"conv1\"\r\n>   top: \"conv1\"\r\n> }\r\n> layer {\r\n>   name: \"pool1\"\r\n>   type: \"Pooling\"\r\n>   bottom: \"conv1\"\r\n>   top: \"pool1\"\r\n>   pooling_param {\r\n>     pool: MAX\r\n>     kernel_size: 3\r\n>     stride: 2\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"norm1\"\r\n>   type: \"LRN\"\r\n>   bottom: \"pool1\"\r\n>   top: \"norm1\"\r\n>   lrn_param {\r\n>     local_size: 5\r\n>     alpha: 0.0001\r\n>     beta: 0.75\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"conv2\"\r\n>   type: \"Convolution\"\r\n>   bottom: \"norm1\"\r\n>   top: \"conv2\"\r\n>   convolution_param {\r\n>     num_output: 256\r\n>     pad: 2\r\n>     kernel_size: 5\r\n>     group: 2\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"relu2\"\r\n>   type: \"ReLU\"\r\n>   bottom: \"conv2\"\r\n>   top: \"conv2\"\r\n> }\r\n> layer {\r\n>   name: \"pool2\"\r\n>   type: \"Pooling\"\r\n>   bottom: \"conv2\"\r\n>   top: \"pool2\"\r\n>   pooling_param {\r\n>     pool: MAX\r\n>     kernel_size: 3\r\n>     stride: 2\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"norm2\"\r\n>   type: \"LRN\"\r\n>   bottom: \"pool2\"\r\n>   top: \"norm2\"\r\n>   lrn_param {\r\n>     local_size: 5\r\n>     alpha: 0.0001\r\n>     beta: 0.75\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"conv3\"\r\n>   type: \"Convolution\"\r\n>   bottom: \"norm2\"\r\n>   top: \"conv3\"\r\n>   convolution_param {\r\n>     num_output: 384\r\n>     pad: 1\r\n>     kernel_size: 3\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"relu3\"\r\n>   type: \"ReLU\"\r\n>   bottom: \"conv3\"\r\n>   top: \"conv3\"\r\n> }\r\n> layer {\r\n>   name: \"conv4\"\r\n>   type: \"Convolution\"\r\n>   bottom: \"conv3\"\r\n>   top: \"conv4\"\r\n>   convolution_param {\r\n>     num_output: 384\r\n>     pad: 1\r\n>     kernel_size: 3\r\n>     group: 2\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"relu4\"\r\n>   type: \"ReLU\"\r\n>   bottom: \"conv4\"\r\n>   top: \"conv4\"\r\n> }\r\n> layer {\r\n>   name: \"conv5\"\r\n>   type: \"Convolution\"\r\n>   bottom: \"conv4\"\r\n>   top: \"conv5\"\r\n>   convolution_param {\r\n>     num_output: 256\r\n>     pad: 1\r\n>     kernel_size: 3\r\n>     group: 2\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"relu5\"\r\n>   type: \"ReLU\"\r\n>   bottom: \"conv5\"\r\n>   top: \"conv5\"\r\n> }\r\n> layer {\r\n>   name: \"pool5\"\r\n>   type: \"Pooling\"\r\n>   bottom: \"conv5\"\r\n>   top: \"pool5\"\r\n>   pooling_param {\r\n>     pool: MAX\r\n>     kernel_size: 3\r\n>     stride: 2\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"fc6\"\r\n>   type: \"InnerProduct\"\r\n>   bottom: \"pool5\"\r\n>   top: \"fc6\"\r\n>   inner_product_param {\r\n>     num_output: 4096\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"relu6\"\r\n>   type: \"ReLU\"\r\n>   bottom: \"fc6\"\r\n>   top: \"fc6\"\r\n> }\r\n> layer {\r\n>   name: \"drop6\"\r\n>   type: \"Dropout\"\r\n>   bottom: \"fc6\"\r\n>   top: \"fc6\"\r\n>   dropout_param {\r\n>     dropout_ratio: 0.5\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"fc7\"\r\n>   type: \"InnerProduct\"\r\n>   bottom: \"fc6\"\r\n>   top: \"fc7\"\r\n>   inner_product_param {\r\n>     num_output: 4096\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"relu7\"\r\n>   type: \"ReLU\"\r\n>   bottom: \"fc7\"\r\n>   top: \"fc7\"\r\n> }\r\n> layer {\r\n>   name: \"latent_layer\"\r\n>   type: \"InnerProduct\"\r\n>   bottom: \"fc7\"\r\n>   top: \"latent_layer\"\r\n>   inner_product_param {\r\n>     num_output: 48\r\n>   }\r\n> }\r\n> layer {\r\n>   name: \"encode_neuron\"\r\n>   type: \"Sigmoid\"\r\n>   bottom: \"latent_layer\"\r\n>   top: \"encode_neuron\"\r\n> }\r\n\r\nmen_ssdh_solver.prototxt\r\n\r\n> net: \"men_ssdh.prototxt\"\r\n> test_iter: 100\r\n> test_interval: 100\r\n> base_lr: 0.001\r\n> lr_policy: \"step\"\r\n> gamma: 0.1\r\n> stepsize: 25000\r\n> display: 20\r\n> max_iter: 50000\r\n> momentum: 0.9\r\n> weight_decay: 0.0005\r\n> snapshot: 10000\r\n> snapshot_prefix: \"men_ssdh\"\r\n\r\nI'm trying to create the service with this call: \r\n```\r\ncurl -X PUT \"http://localhost:8090/services/men_ssdh_orig\" -d \"{\\\"mllib\\\":\\\"caffe\\\",\\\"description\\\":\\\"image classification men finetuned\\\",\\\"type\\\":\\\"supervised\\\",\\\"parameters\\\":{\\\"input\\\":{\\\"connector\\\":\\\"image\\\",\\\"width\\\":227,\\\"height\\\":227},\\\"mllib\\\":{\\\"nclasses\\\":10}},\\\"model\\\":{\\\"repository\\\":\\\"/home/ubuntu/code/deepdetect/models/men_ssdh\\\"}}\" \r\n```\r\n\r\nThis fails with \r\n```\r\nINFO - 11:50:20 - Initializing net from parameters: \r\nE0720 11:50:20.006518 12587 caffelib.cc:1228] Error creating network\r\n\r\nERROR - 11:50:20 - service creation call failed\r\n```\r\n\r\nAny clue about what is wrong with the above initialization ? \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/beniz/deepdetect/issues/comments/239160646","html_url":"https://github.com/beniz/deepdetect/issues/159#issuecomment-239160646","issue_url":"https://api.github.com/repos/beniz/deepdetect/issues/159","id":239160646,"user":{"login":"beniz","id":3530657,"avatar_url":"https://avatars.githubusercontent.com/u/3530657?v=3","gravatar_id":"","url":"https://api.github.com/users/beniz","html_url":"https://github.com/beniz","followers_url":"https://api.github.com/users/beniz/followers","following_url":"https://api.github.com/users/beniz/following{/other_user}","gists_url":"https://api.github.com/users/beniz/gists{/gist_id}","starred_url":"https://api.github.com/users/beniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beniz/subscriptions","organizations_url":"https://api.github.com/users/beniz/orgs","repos_url":"https://api.github.com/users/beniz/repos","events_url":"https://api.github.com/users/beniz/events{/privacy}","received_events_url":"https://api.github.com/users/beniz/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T13:29:09Z","updated_at":"2016-08-11T13:29:09Z","body":"The `cudaSuccess` error is a GPU memory error. Obviously you do not have enough memory for training + testing. Try lower the `test_batch_size` and possibly the `batch_size` also. `nvidia-smi` should let you see how much memory is left on your GPU. Use `test_initialization:true` to force a test call right before training, this will tell you whether the whole thing can fit into memory."}}
{"actor":{"display_login":"beniz"}}