{
  "id": 10493,
  "title": "Train you very own deep convolutional network",
  "url": "/competitions/cifar-10/discussion/10493",
  "author_name": "",
  "post_date": "2014-09-30T20:02:36.070Z",
  "votes": 27,
  "comment_count": 7,
  "views": 20797,
  "content": "<p>Attached is a (new) implementation of a &quot;spatially-sparse&quot; convolutional network (http://arxiv.org/abs/1409.6070).</p>\n<p>Step 1) Look at the README file.<br>Step 2) Define a network architecture in terms of LeNet style layers. The input layer can be much larger than 32x32, and it will still run relatively efficiently (sparsity!). Be sure to include lots of Network-In-Network layers. [See runCifar10Kaggle.cu]<br>Step 3) Specify some kind of affine distortion to apply to the training data. [See OpenCVPicture_AffineTransform.h]<br>Step 4) Hope it all compiles. <br>Step 5) Run it for a long time; hope it does not crash.</p>\n<p>Requirements: CUDA (sm_20), OpenCV, Boost and a reasonably fast GPU</p>",
  "messages": [
    {
      "id": "55439",
      "postDate": "09/30/2014 20:02:36",
      "content": "<p>Attached is a (new) implementation of a &quot;spatially-sparse&quot; convolutional network (http://arxiv.org/abs/1409.6070).</p>\n<p>Step 1) Look at the README file.<br>Step 2) Define a network architecture in terms of LeNet style layers. The input layer can be much larger than 32x32, and it will still run relatively efficiently (sparsity!). Be sure to include lots of Network-In-Network layers. [See runCifar10Kaggle.cu]<br>Step 3) Specify some kind of affine distortion to apply to the training data. [See OpenCVPicture_AffineTransform.h]<br>Step 4) Hope it all compiles. <br>Step 5) Run it for a long time; hope it does not crash.</p>\n<p>Requirements: CUDA (sm_20), OpenCV, Boost and a reasonably fast GPU</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "55713",
      "postDate": "10/07/2014 03:44:46",
      "content": "<p>I compile the code, then meet some error. The way I solve the errors is following:</p>\n<p>1.If you meet&nbsp;</p>\n<p>/usr/lib/gcc/x86_64-linux-gnu/4.6/include/xmmintrin.h(1015): error: identifier &quot;__builtin_ia32_vec_set_v4hi&quot; is undefined/usr/lib/gcc/x86_64-linux-gnu/4.6/include/xmmintrin.h(1116): error: identifier &quot;__builtin_ia32_pshufw&quot; is undefined/usr/lib/gcc/x86_64-linux-gnu/4.6/include/emmintrin.h(1312): error: identifier &quot;__builtin_ia32_vec_ext_v8hi&quot; is undefined/usr/lib/gcc/x86_64-linux-gnu/4.6/include/emmintrin.h(1318): error: identifier &quot;__builtin_ia32_vec_set_v8hi&quot; is undefined4 errors detected in the compilation of &quot;/tmp/tmpxft_00001d10_00000000-6_runCifar100.cpp1.ii&quot;.</p>\n<p>You can&nbsp;use cuda &gt;=5.5, or do not use the -O2 in compiling</p>\n<p>2.If you meet &nbsp;</p>\n<p>/usr/local/include/boost/assert.hpp:102:47: error: &#8216;noinline&#8217; was not declared in this scope</p>\n<p>You can add&nbsp;-DBOOST_NOINLINE='__attribute__ ((noinline))'</p>\n<p>3.If you meet&nbsp;</p>\n<p>/usr/bin/ld: /tmp/tmpxft_00004332_00000000-16_runCifar10Kaggle.o: undefined reference to symbol 'boost::system::system_category()'<br>/usr/bin/ld: note: 'boost::system::system_category()' is defined in DSO /usr/local/lib/libboost_system.so.1.55.0 so try adding it to the linker command line<br>/usr/local/lib/libboost_system.so.1.55.0: could not read symbols: Invalid operation</p>\n<p>You can add&nbsp;-lboost_system</p>\n<p>So the you can compile as:</p>\n<p>/usr/local/cuda-5.5/bin/nvcc -DBOOST_NOINLINE='__attribute__ ((noinline))' runCifar10Kaggle.cu readImageToMat.o -lopencv_core -lopencv_highgui -lopencv_imgproc -lrt -lcublas -lboost_thread -lboost_system -ljpeg -arch sm_20 -O2</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "55921",
      "postDate": "10/11/2014 10:41:13",
      "content": "<p>Thank you jiki for your suggestions and fixes.</p>\n<p>Revised program attached.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "56267",
      "postDate": "10/20/2014 00:51:24",
      "content": "<p>Attached is the specification for a network architecture used get a test accuracy of 0.9553.</p>\n<p>Architecture: input=(3x126x126) -<br>&nbsp;320C2 - 320C2 - MP2 -<br>&nbsp;640C2 - 10% dropout - 640C2 - 10% dropout - MP2 -<br>&nbsp;960C2 - 20% dropout - 960C2 - 20% dropout - MP2 -<br>&nbsp;1280C2 - 30% dropout - 1280C2 - 30% dropout - MP2 -<br>&nbsp;1600C2 - 40% dropout - 1600C2 - 40% dropout - MP2 -<br>&nbsp;1920C2 - 50% dropout - 1920C1 - 50% dropout - 10C1 - Softmax output<br>&nbsp;(inspired by<br>&nbsp;Multi-column deep neural networks for image classification; Ciresan, Meier and Schmidhuber;<br>&nbsp;Network In Network; Lin, Chen and Yan;<br>&nbsp;Very Deep Convolutional Networks for Large-Scale Image Recognition; Simonyan and Zisserman)&quot;&quot;&quot;</p>\n<p>It is a deep convolutional network trained using SparseConvNet (see http://arxiv.org/abs/1409.6070) taking advantage of<br> - spatial-sparsity in the 126x126 input layer,<br> - batchwise dropout and a form of Nesterov's accelerated gradient descent,<br> - (very) leaky rectified linear units, and<br> - spatial and color training data augmentation.</p>\n<p>Train for 500+ iterations, with affine training data augmentation. Then run for 10 more iterations with the affine training data augmentation removed.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "56310",
      "postDate": "10/21/2014 02:52:14",
      "content": "<p>Combined 5 different CNNs, get&nbsp;accuracy of 0.94740.</p>\n<p>The best single CNN get&nbsp;accuracy of 0.93640.</p>\n<p>Three CNNs use&nbsp;Benjamin Graham&#8216;s&nbsp;spatially-sparse CNN, and two use&nbsp;convnet&nbsp;with dropconnect(see&nbsp;http://cs.nyu.edu/~wanli/dropc/ and&nbsp;http://code.google.com/p/cuda-convnet/).</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64861",
      "postDate": "02/25/2015 14:05:58",
      "content": "<p>just wondering whether any one manage to compile the&nbsp;sparseConvNetKaggleCifar10Edition.zip &nbsp;on Mac OS?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "114461",
      "postDate": "04/11/2016 04:49:55",
      "content": "<p>Whenever I tweak the convolution parameters, even changing the number 160, the train set error rate will raise to 90% and become stable after a few hundred epochs. However the origin params won't cause such problem. Does anyone know what might be the cause? </p>",
      "rawMarkdown": "Whenever I tweak the convolution parameters, even changing the number 160, the train set error rate will raise to 90% and become stable after a few hundred epochs. However the origin params won't cause such problem. Does anyone know what might be the cause?",
      "votes": null
    },
    {
      "id": "114497",
      "postDate": "04/11/2016 12:54:33",
      "content": "<p>A more recent version of the software can be found here:\n<a href=\"https://github.com/btgraham/SparseConvNet\">https://github.com/btgraham/SparseConvNet</a></p>",
      "rawMarkdown": "A more recent version of the software can be found here:\r\nhttps://github.com/btgraham/SparseConvNet",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 55713,
      "author_name": "jiki103869",
      "author_url": "",
      "post_date": "10/07/2014 03:44:46",
      "content": "<p>I compile the code, then meet some error. The way I solve the errors is following:</p>\n<p>1.If you meet&nbsp;</p>\n<p>/usr/lib/gcc/x86_64-linux-gnu/4.6/include/xmmintrin.h(1015): error: identifier &quot;__builtin_ia32_vec_set_v4hi&quot; is undefined/usr/lib/gcc/x86_64-linux-gnu/4.6/include/xmmintrin.h(1116): error: identifier &quot;__builtin_ia32_pshufw&quot; is undefined/usr/lib/gcc/x86_64-linux-gnu/4.6/include/emmintrin.h(1312): error: identifier &quot;__builtin_ia32_vec_ext_v8hi&quot; is undefined/usr/lib/gcc/x86_64-linux-gnu/4.6/include/emmintrin.h(1318): error: identifier &quot;__builtin_ia32_vec_set_v8hi&quot; is undefined4 errors detected in the compilation of &quot;/tmp/tmpxft_00001d10_00000000-6_runCifar100.cpp1.ii&quot;.</p>\n<p>You can&nbsp;use cuda &gt;=5.5, or do not use the -O2 in compiling</p>\n<p>2.If you meet &nbsp;</p>\n<p>/usr/local/include/boost/assert.hpp:102:47: error: &#8216;noinline&#8217; was not declared in this scope</p>\n<p>You can add&nbsp;-DBOOST_NOINLINE='__attribute__ ((noinline))'</p>\n<p>3.If you meet&nbsp;</p>\n<p>/usr/bin/ld: /tmp/tmpxft_00004332_00000000-16_runCifar10Kaggle.o: undefined reference to symbol 'boost::system::system_category()'<br>/usr/bin/ld: note: 'boost::system::system_category()' is defined in DSO /usr/local/lib/libboost_system.so.1.55.0 so try adding it to the linker command line<br>/usr/local/lib/libboost_system.so.1.55.0: could not read symbols: Invalid operation</p>\n<p>You can add&nbsp;-lboost_system</p>\n<p>So the you can compile as:</p>\n<p>/usr/local/cuda-5.5/bin/nvcc -DBOOST_NOINLINE='__attribute__ ((noinline))' runCifar10Kaggle.cu readImageToMat.o -lopencv_core -lopencv_highgui -lopencv_imgproc -lrt -lcublas -lboost_thread -lboost_system -ljpeg -arch sm_20 -O2</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 55921,
      "author_name": "btgraham",
      "author_url": "",
      "post_date": "10/11/2014 10:41:13",
      "content": "<p>Thank you jiki for your suggestions and fixes.</p>\n<p>Revised program attached.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 56267,
      "author_name": "btgraham",
      "author_url": "",
      "post_date": "10/20/2014 00:51:24",
      "content": "<p>Attached is the specification for a network architecture used get a test accuracy of 0.9553.</p>\n<p>Architecture: input=(3x126x126) -<br>&nbsp;320C2 - 320C2 - MP2 -<br>&nbsp;640C2 - 10% dropout - 640C2 - 10% dropout - MP2 -<br>&nbsp;960C2 - 20% dropout - 960C2 - 20% dropout - MP2 -<br>&nbsp;1280C2 - 30% dropout - 1280C2 - 30% dropout - MP2 -<br>&nbsp;1600C2 - 40% dropout - 1600C2 - 40% dropout - MP2 -<br>&nbsp;1920C2 - 50% dropout - 1920C1 - 50% dropout - 10C1 - Softmax output<br>&nbsp;(inspired by<br>&nbsp;Multi-column deep neural networks for image classification; Ciresan, Meier and Schmidhuber;<br>&nbsp;Network In Network; Lin, Chen and Yan;<br>&nbsp;Very Deep Convolutional Networks for Large-Scale Image Recognition; Simonyan and Zisserman)&quot;&quot;&quot;</p>\n<p>It is a deep convolutional network trained using SparseConvNet (see http://arxiv.org/abs/1409.6070) taking advantage of<br> - spatial-sparsity in the 126x126 input layer,<br> - batchwise dropout and a form of Nesterov's accelerated gradient descent,<br> - (very) leaky rectified linear units, and<br> - spatial and color training data augmentation.</p>\n<p>Train for 500+ iterations, with affine training data augmentation. Then run for 10 more iterations with the affine training data augmentation removed.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 56310,
      "author_name": "jiki103869",
      "author_url": "",
      "post_date": "10/21/2014 02:52:14",
      "content": "<p>Combined 5 different CNNs, get&nbsp;accuracy of 0.94740.</p>\n<p>The best single CNN get&nbsp;accuracy of 0.93640.</p>\n<p>Three CNNs use&nbsp;Benjamin Graham&#8216;s&nbsp;spatially-sparse CNN, and two use&nbsp;convnet&nbsp;with dropconnect(see&nbsp;http://cs.nyu.edu/~wanli/dropc/ and&nbsp;http://code.google.com/p/cuda-convnet/).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64861,
      "author_name": "vinhnguyen",
      "author_url": "",
      "post_date": "02/25/2015 14:05:58",
      "content": "<p>just wondering whether any one manage to compile the&nbsp;sparseConvNetKaggleCifar10Edition.zip &nbsp;on Mac OS?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 114461,
      "author_name": "julianyg",
      "author_url": "",
      "post_date": "04/11/2016 04:49:55",
      "content": "<p>Whenever I tweak the convolution parameters, even changing the number 160, the train set error rate will raise to 90% and become stable after a few hundred epochs. However the origin params won't cause such problem. Does anyone know what might be the cause? </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 114497,
      "author_name": "btgraham",
      "author_url": "",
      "post_date": "04/11/2016 12:54:33",
      "content": "<p>A more recent version of the software can be found here:\n<a href=\"https://github.com/btgraham/SparseConvNet\">https://github.com/btgraham/SparseConvNet</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "55439": "",
    "55713": "",
    "55921": "",
    "56267": "",
    "56310": "",
    "64861": "",
    "114461": "Whenever I tweak the convolution parameters, even changing the number 160, the train set error rate will raise to 90% and become stable after a few hundred epochs. However the origin params won't cause such problem. Does anyone know what might be the cause?",
    "114497": "A more recent version of the software can be found here:\r\nhttps://github.com/btgraham/SparseConvNet"
  },
  "source": "meta"
}