{
  "id": 18935,
  "title": "Deep learning tutorial error on kernel size, kernel_h and kernel_w",
  "url": "/competitions/second-annual-data-science-bowl/discussion/18935",
  "author_name": "",
  "post_date": "2016-02-13T08:07:21.727Z",
  "votes": null,
  "comment_count": 7,
  "views": 1499,
  "content": "<p>I'm new to Caffe, and I'm following Deep Learning Tutorial. </p>\n\n<p>I have created a python script to read the images, and create the databases (Steps 1 and 2). It works. Then I created another script to train and validate (steps 3-15) and also solver file. \nThe script creates the networks (fcn_train and fcn_test, contents match tutorial), however the script fails at \nsolver = caffe.SGDSolver('fcn_solver.prototxt&quot;)\nThe error message is below:</p>\n\n<p>I0213 01:30:33.690608 24127 layer_factory.hpp:76] Creating layer data</p>\n\n<p>I0213 01:30:33.691711 24127 net.cpp:111] Creating Layer data </p>\n\n<p>I0213 01:30:33.691727 24127 net.cpp:434] data -&gt; data </p>\n\n<p>I0213 01:30:33.69281124379 db_lmdb.cpp:22] Opened lmdb train_images_lmdb/</p>\n\n<p>..... </p>\n\n<p>I0213 01:30:33.744316 24127 net.cpp:478] upscore &lt;- score_classes </p>\n\n<p>I0213 01:30:33.744321 24127 net.cpp:434] upscore -&gt; upscore </p>\n\n<p>F0213 01:30:33.744328 24127 base_conv_layer.cpp:19] Check failed: !conv_param.has_kernel_size() != !(conv_param.has_kernel_h() &amp;&amp; conv_param.has_kernel_w()) Filter size is kernel_size OR kernel_h and kernel_w; not both <strong>* Check failure stack trace: *</strong></p>\n\n<p>In fcn_ files, there is only a reference to kernel_size, and no other reference to kernel_h or kernel_w.</p>\n\n<p>Does anybody else have the same problem, and is there a solution?</p>\n\n<p>Best,\nOB</p>",
  "messages": [
    {
      "id": "107866",
      "postDate": "02/13/2016 08:07:21",
      "content": "<p>I'm new to Caffe, and I'm following Deep Learning Tutorial. </p>\n\n<p>I have created a python script to read the images, and create the databases (Steps 1 and 2). It works. Then I created another script to train and validate (steps 3-15) and also solver file. \nThe script creates the networks (fcn_train and fcn_test, contents match tutorial), however the script fails at \nsolver = caffe.SGDSolver('fcn_solver.prototxt&quot;)\nThe error message is below:</p>\n\n<p>I0213 01:30:33.690608 24127 layer_factory.hpp:76] Creating layer data</p>\n\n<p>I0213 01:30:33.691711 24127 net.cpp:111] Creating Layer data </p>\n\n<p>I0213 01:30:33.691727 24127 net.cpp:434] data -&gt; data </p>\n\n<p>I0213 01:30:33.69281124379 db_lmdb.cpp:22] Opened lmdb train_images_lmdb/</p>\n\n<p>..... </p>\n\n<p>I0213 01:30:33.744316 24127 net.cpp:478] upscore &lt;- score_classes </p>\n\n<p>I0213 01:30:33.744321 24127 net.cpp:434] upscore -&gt; upscore </p>\n\n<p>F0213 01:30:33.744328 24127 base_conv_layer.cpp:19] Check failed: !conv_param.has_kernel_size() != !(conv_param.has_kernel_h() &amp;&amp; conv_param.has_kernel_w()) Filter size is kernel_size OR kernel_h and kernel_w; not both <strong>* Check failure stack trace: *</strong></p>\n\n<p>In fcn_ files, there is only a reference to kernel_size, and no other reference to kernel_h or kernel_w.</p>\n\n<p>Does anybody else have the same problem, and is there a solution?</p>\n\n<p>Best,\nOB</p>",
      "rawMarkdown": "I'm new to Caffe, and I'm following Deep Learning Tutorial. \r\n\r\nI have created a python script to read the images, and create the databases (Steps 1 and 2). It works. Then I created another script to train and validate (steps 3-15) and also solver file. \r\nThe script creates the networks (fcn_train and fcn_test, contents match tutorial), however the script fails at \r\nsolver = caffe.SGDSolver('fcn_solver.prototxt\")\r\nThe error message is below:\r\n\r\nI0213 01:30:33.690608 24127 layer_factory.hpp:76] Creating layer data\r\n\r\nI0213 01:30:33.691711 24127 net.cpp:111] Creating Layer data \r\n\r\nI0213 01:30:33.691727 24127 net.cpp:434] data -> data \r\n\r\nI0213 01:30:33.69281124379 db_lmdb.cpp:22] Opened lmdb train_images_lmdb/\r\n\r\n ..... \r\n\r\nI0213 01:30:33.744316 24127 net.cpp:478] upscore <- score_classes \r\n\r\nI0213 01:30:33.744321 24127 net.cpp:434] upscore -> upscore \r\n\r\nF0213 01:30:33.744328 24127 base_conv_layer.cpp:19] Check failed: !conv_param.has_kernel_size() != !(conv_param.has_kernel_h() && conv_param.has_kernel_w()) Filter size is kernel_size OR kernel_h and kernel_w; not both *** Check failure stack trace: ***\r\n\r\nIn fcn_ files, there is only a reference to kernel_size, and no other reference to kernel_h or kernel_w.\r\n\r\nDoes anybody else have the same problem, and is there a solution?\r\n\r\nBest,\r\nOB",
      "votes": null
    },
    {
      "id": "107885",
      "postDate": "02/13/2016 13:50:44",
      "content": "<p>Are you using the last Caffe version ? </p>",
      "rawMarkdown": "Are you using the last Caffe version ?",
      "votes": null
    },
    {
      "id": "107887",
      "postDate": "02/13/2016 14:07:40",
      "content": "<p>Are you using exactly the network prototxt files from the tutorial or is your script creating them?</p>",
      "rawMarkdown": "Are you using exactly the network prototxt files from the tutorial or is your script creating them?",
      "votes": null
    },
    {
      "id": "107893",
      "postDate": "02/13/2016 15:42:14",
      "content": "<p>@Alvaro Osvaldo,\nI was using the branch pointed at the tutorial, git clone <a href=\"https://github.com/longjon/caffe.git\">https://github.com/longjon/caffe.git</a>. I will compile the official master to see if it helps (the related cpp file seems to be similar though).</p>\n\n<p>@senecaur,\nMy script generates the scripts, but I have compared the generated one to the tutorials' example and they match each other perfectly.</p>",
      "rawMarkdown": "Alvaro Osvaldo,\r\nI was using the branch pointed at the tutorial, git clone https://github.com/longjon/caffe.git. I will compile the official master to see if it helps (the related cpp file seems to be similar though).\r\n\r\n@senecaur,\r\nMy script generates the scripts, but I have compared the generated one to the tutorials' example and they match each other perfectly.",
      "votes": null
    },
    {
      "id": "107897",
      "postDate": "02/13/2016 16:17:17",
      "content": "<p>Obben, i don't have these problem. But you should try to use the last version.\nIt can see a bug that only happens in your operation system.</p>",
      "rawMarkdown": "Obben, i don't have these problem. But you should try to use the last version.\r\nIt can see a bug that only happens in your operation system.",
      "votes": null
    },
    {
      "id": "107911",
      "postDate": "02/13/2016 18:49:12",
      "content": "<p>Thanks Alvaro,\nThe latest version on the hub gives a similar but slightly different error</p>\n\n<p>F0213 12:46:52.871088  9270 base_conv_layer.cpp:36] Check failed: num_kernel_dims == 1 || num_kernel_dims == num_spatial_axes_ kernel_size must be specified once, or once per spatial dimension (kernel_size specified 0 times; 2 spatial dims).</p>\n\n<p>I will keep investigating the root cause .</p>\n\n<p>edit:I suspect it is related to deconvolution changes. I made them offline, but of course everytime I run the script it regenerates the network files. I will try and update.</p>",
      "rawMarkdown": "Thanks Alvaro,\r\nThe latest version on the hub gives a similar but slightly different error\r\n\r\nF0213 12:46:52.871088  9270 base_conv_layer.cpp:36] Check failed: num_kernel_dims == 1 || num_kernel_dims == num_spatial_axes_ kernel_size must be specified once, or once per spatial dimension (kernel_size specified 0 times; 2 spatial dims).\r\n\r\n\r\nI will keep investigating the root cause .\r\n\r\nedit:I suspect it is related to deconvolution changes. I made them offline, but of course everytime I run the script it regenerates the network files. I will try and update.",
      "votes": null
    },
    {
      "id": "107916",
      "postDate": "02/13/2016 19:00:27",
      "content": "<p>Yes, that was it.\nThe latest caffe doesn't work, but the one from the tutorial works after I created  the networks once and manually changed them.\nNow it is running  albeit slowly. Most likely I will recompile caffe  with cuNN support.</p>",
      "rawMarkdown": "Yes, that was it.\r\nThe latest caffe doesn't work, but the one from the tutorial works after I created  the networks once and manually changed them.\r\nNow it is running  albeit slowly. Most likely I will recompile caffe  with cuNN support.",
      "votes": null
    },
    {
      "id": "107980",
      "postDate": "02/14/2016 13:22:38",
      "content": "<p>That complicated O.o\nGood luck Obben. :D </p>",
      "rawMarkdown": "That complicated O.o\r\nGood luck Obben. :D",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 107885,
      "author_name": "alvaroosvaldo",
      "author_url": "",
      "post_date": "02/13/2016 13:50:44",
      "content": "<p>Are you using the last Caffe version ? </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 107887,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "02/13/2016 14:07:40",
      "content": "<p>Are you using exactly the network prototxt files from the tutorial or is your script creating them?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 107893,
      "author_name": "obbenb",
      "author_url": "",
      "post_date": "02/13/2016 15:42:14",
      "content": "<p>@Alvaro Osvaldo,\nI was using the branch pointed at the tutorial, git clone <a href=\"https://github.com/longjon/caffe.git\">https://github.com/longjon/caffe.git</a>. I will compile the official master to see if it helps (the related cpp file seems to be similar though).</p>\n\n<p>@senecaur,\nMy script generates the scripts, but I have compared the generated one to the tutorials' example and they match each other perfectly.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 107897,
      "author_name": "alvaroosvaldo",
      "author_url": "",
      "post_date": "02/13/2016 16:17:17",
      "content": "<p>Obben, i don't have these problem. But you should try to use the last version.\nIt can see a bug that only happens in your operation system.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 107911,
      "author_name": "obbenb",
      "author_url": "",
      "post_date": "02/13/2016 18:49:12",
      "content": "<p>Thanks Alvaro,\nThe latest version on the hub gives a similar but slightly different error</p>\n\n<p>F0213 12:46:52.871088  9270 base_conv_layer.cpp:36] Check failed: num_kernel_dims == 1 || num_kernel_dims == num_spatial_axes_ kernel_size must be specified once, or once per spatial dimension (kernel_size specified 0 times; 2 spatial dims).</p>\n\n<p>I will keep investigating the root cause .</p>\n\n<p>edit:I suspect it is related to deconvolution changes. I made them offline, but of course everytime I run the script it regenerates the network files. I will try and update.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 107916,
      "author_name": "obbenb",
      "author_url": "",
      "post_date": "02/13/2016 19:00:27",
      "content": "<p>Yes, that was it.\nThe latest caffe doesn't work, but the one from the tutorial works after I created  the networks once and manually changed them.\nNow it is running  albeit slowly. Most likely I will recompile caffe  with cuNN support.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 107980,
      "author_name": "alvaroosvaldo",
      "author_url": "",
      "post_date": "02/14/2016 13:22:38",
      "content": "<p>That complicated O.o\nGood luck Obben. :D </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "107866": "I'm new to Caffe, and I'm following Deep Learning Tutorial. \r\n\r\nI have created a python script to read the images, and create the databases (Steps 1 and 2). It works. Then I created another script to train and validate (steps 3-15) and also solver file. \r\nThe script creates the networks (fcn_train and fcn_test, contents match tutorial), however the script fails at \r\nsolver = caffe.SGDSolver('fcn_solver.prototxt\")\r\nThe error message is below:\r\n\r\nI0213 01:30:33.690608 24127 layer_factory.hpp:76] Creating layer data\r\n\r\nI0213 01:30:33.691711 24127 net.cpp:111] Creating Layer data \r\n\r\nI0213 01:30:33.691727 24127 net.cpp:434] data -> data \r\n\r\nI0213 01:30:33.69281124379 db_lmdb.cpp:22] Opened lmdb train_images_lmdb/\r\n\r\n ..... \r\n\r\nI0213 01:30:33.744316 24127 net.cpp:478] upscore <- score_classes \r\n\r\nI0213 01:30:33.744321 24127 net.cpp:434] upscore -> upscore \r\n\r\nF0213 01:30:33.744328 24127 base_conv_layer.cpp:19] Check failed: !conv_param.has_kernel_size() != !(conv_param.has_kernel_h() && conv_param.has_kernel_w()) Filter size is kernel_size OR kernel_h and kernel_w; not both *** Check failure stack trace: ***\r\n\r\nIn fcn_ files, there is only a reference to kernel_size, and no other reference to kernel_h or kernel_w.\r\n\r\nDoes anybody else have the same problem, and is there a solution?\r\n\r\nBest,\r\nOB",
    "107885": "Are you using the last Caffe version ?",
    "107887": "Are you using exactly the network prototxt files from the tutorial or is your script creating them?",
    "107893": "Alvaro Osvaldo,\r\nI was using the branch pointed at the tutorial, git clone https://github.com/longjon/caffe.git. I will compile the official master to see if it helps (the related cpp file seems to be similar though).\r\n\r\n@senecaur,\r\nMy script generates the scripts, but I have compared the generated one to the tutorials' example and they match each other perfectly.",
    "107897": "Obben, i don't have these problem. But you should try to use the last version.\r\nIt can see a bug that only happens in your operation system.",
    "107911": "Thanks Alvaro,\r\nThe latest version on the hub gives a similar but slightly different error\r\n\r\nF0213 12:46:52.871088  9270 base_conv_layer.cpp:36] Check failed: num_kernel_dims == 1 || num_kernel_dims == num_spatial_axes_ kernel_size must be specified once, or once per spatial dimension (kernel_size specified 0 times; 2 spatial dims).\r\n\r\n\r\nI will keep investigating the root cause .\r\n\r\nedit:I suspect it is related to deconvolution changes. I made them offline, but of course everytime I run the script it regenerates the network files. I will try and update.",
    "107916": "Yes, that was it.\r\nThe latest caffe doesn't work, but the one from the tutorial works after I created  the networks once and manually changed them.\r\nNow it is running  albeit slowly. Most likely I will recompile caffe  with cuNN support.",
    "107980": "That complicated O.o\r\nGood luck Obben. :D"
  },
  "source": "meta"
}