{
  "id": 11279,
  "title": "Public Start Guide of Deep Network with a score of 1.382285",
  "url": "/competitions/datasciencebowl/discussion/11279",
  "author_name": "",
  "post_date": "2014-12-17T04:10:34.097Z",
  "votes": 48,
  "comment_count": 137,
  "views": 69047,
  "content": "<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>",
  "messages": [
    {
      "id": "60426",
      "postDate": "12/17/2014 04:10:34",
      "content": "<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60429",
      "postDate": "12/17/2014 05:03:41",
      "content": "<p>Can I use CXXNET on a windows machine?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60431",
      "postDate": "12/17/2014 05:06:18",
      "content": "<p>I don't have Windows machine with GPU so I am not very sure.. I guess you can but you need to configure by yourself.</p>\n<p>[quote=kartal;60429]</p>\n<p>Can I use CXXNET on a windows machine?</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60439",
      "postDate": "12/17/2014 07:20:29",
      "content": "<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60440",
      "postDate": "12/17/2014 07:31:27",
      "content": "<p>You can, you need blas or MKL installed. Then set dev=cpu in config file</p>\n\n<p>[quote=Issac;60439]</p>\n<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60441",
      "postDate": "12/17/2014 07:46:28",
      "content": "<p>Very nice, star-ed it on github!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60464",
      "postDate": "12/17/2014 11:13:08",
      "content": "<p>Thank you very much! How much main memory and GPU memory does it require?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60483",
      "postDate": "12/17/2014 14:12:56",
      "content": "<p>What's the difference between cxxnet and <a href=\"http://caffe.berkeleyvision.org/\">Caffe</a>?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60499",
      "postDate": "12/17/2014 16:30:48",
      "content": "<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>Bing, thanks! This is great work, as usual :-)</p>\n<p>I hate to tell you this, but in the beginning I'm afraid you'll end up getting more questions about how to install this (and errors while installing) than how to use it. I think adding more details in the wiki about the install, dependencies, where to get the dependencies, how to make sure those work, how to troubleshoot errors,.. might save you time in the long run.</p>\n<p>But again, awesome work! Thanks a lot!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60503",
      "postDate": "12/17/2014 16:43:42",
      "content": "<p>Ahh... I wish I had GPU :-/</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61418",
      "postDate": "12/17/2014 20:02:17",
      "content": "<p>Thanks Bing - this is as good and straight-forward of an intro to deep learning using a GPU as anyone could hope for. &nbsp;I understand you had a GTX 780M or something like that for processing. &nbsp;May I also ask how much RAM your system had, and how much was in use while processing, if you happen to know? &nbsp;Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61419",
      "postDate": "12/17/2014 20:09:22",
      "content": "<p>300MB GPU mem, 1GB CPU mem is enough.&nbsp;I remember</p>\n<p>[quote=Johnny Strings;61418]</p>\n<p>Thanks Bing - this is as good and straight-forward of an intro to deep learning using a GPU as anyone could hope for. &nbsp;I understand you had a GTX 780M or something like that for processing. &nbsp;May I also ask how much RAM your system had, and how much was in use while processing, if you happen to know? &nbsp;Thanks!</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61420",
      "postDate": "12/17/2014 20:09:52",
      "content": "<p>You can use CPU. MKL will give you reasonable performance</p>\n<p>[quote=Abhishek;60503]</p>\n<p>Ahh... I wish I had GPU :-/</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61421",
      "postDate": "12/17/2014 20:10:50",
      "content": "<p>Thanks for this advice, I will put link of wiki to README</p>\n<p>[quote=Giulio;60499]</p>\n<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>Bing, thanks! This is great work, as usual :-)</p>\n<p>I hate to tell you this, but in the beginning I'm afraid you'll end up getting more questions about how to install this (and errors while installing) than how to use it. I think adding more details in the wiki about the install, dependencies, where to get the dependencies, how to make sure those work, how to troubleshoot errors,.. might save you time in the long run.</p>\n<p>But again, awesome work! Thanks a lot!</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61423",
      "postDate": "12/17/2014 20:56:13",
      "content": "<p>thanks for sharing. &nbsp;i'm attempting to get this setup with caffe, so this will be a good guide. &nbsp;i'll share my version too if i get it working :)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61426",
      "postDate": "12/17/2014 21:21:27",
      "content": "<p>I am one of the author. In short, they are similar. CXXNET is much shorter, and concise in terms of lines of code.</p>\n\n<p>[quote=ziyuang;60483]</p>\n<p>What's the difference between cxxnet and <a href=\"http://caffe.berkeleyvision.org/\">Caffe</a>?</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61427",
      "postDate": "12/17/2014 21:22:31",
      "content": "<p>[quote=Abhishek;60503]</p>\n<p>Ahh... I wish I had GPU :-/</p>\n<p>[/quote]</p>\n<p>Have you considered using AWS GPU instances?&nbsp;http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html<br>If you're okay with spot pricing and sudden cutoffs, I'm sure you can get a good rate.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61428",
      "postDate": "12/17/2014 21:26:12",
      "content": "<p>[quote=Tianqi Chen;61426]</p>\n<p>I am one of the author. In short, they are similar. CXXNET is much shorter, and concise in terms of lines of code.</p>\n<p>[quote=ziyuang;60483]</p>\n<p>What's the difference between cxxnet and <a href=\"http://caffe.berkeleyvision.org/\">Caffe</a>?</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>How about from the user's angle? Does it mean CXXNET will be faster, or does it mean it will be easier to learn because of the conciseness?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61432",
      "postDate": "12/17/2014 22:09:44",
      "content": "<p>Can CXXNET&nbsp;be run on Macbook pro with GPU?</p>\n<p>I'm getting this:</p>\n<p><code>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:76:12: fatal error: 'mkl.h' file not found<br> #include &lt;mkl.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</code></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61433",
      "postDate": "12/17/2014 22:28:09",
      "content": "<p>In default it is using MKL. I don't have Macbook so I am not sure. Ideally it is able to run on all NVIDIA GPU.</p>\n<p>Please refer<a href=\"https://github.com/antinucleon/cxxnet#build-guide\">&nbsp;https://github.com/antinucleon/cxxnet#build-guide</a>&nbsp;to build it.</p>\n<p>[quote=clustifier;61432]</p>\n<p>Can CXXNET&nbsp;be run on Macbook pro with GPU?</p>\n<p>I'm getting this:</p>\n<p><code>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:76:12: fatal error: 'mkl.h' file not found<br> #include &lt;mkl.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</code></p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61436",
      "postDate": "12/17/2014 23:36:42",
      "content": "<p>Thanks for sharing the code. &nbsp;I have a&nbsp;problems when installing cxxnet&nbsp;on Ubuntu 14.04</p>\n<p>$ build.sh blas=1</p>\n<p><code></code><code><code>g++ -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o bin/cxxnet cxxnet/cxxnet_main.cpp cxxnet_data.o cxxnet_nnet_cpu.o cxxnet_nnet_gpu.o -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>/usr/bin/ld: cxxnet_data.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'<br>//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line<br>collect2: error: ld returned 1 exit status<br>make: *** [bin/cxxnet] Error 1<br></code></code></p>\n<p>How could I fix it?</p>\n\n<p>Meanwhile, do you mean add 'dev=cpu' to&nbsp;bowl.conf ?&nbsp; I didn't find&nbsp; 'dev=cpu' or&nbsp; 'dev=gpu' in any fil</p>\n<p>e. &nbsp;I guess that you are using GPU and it is the default option.</p>\n\n<p>Many Thanks</p>\n\n<p>[</p>\n<p>quote=Bing Xu;60440]</p>\n<p>You can, you need blas or MKL installed. Then set dev=cpu in config file</p>\n<p>[quote=Issac;60439]</p>\n<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61437",
      "postDate": "12/17/2014 23:40:12",
      "content": "<p>I suggest you post in issue on <a href=\"https://github.com/antinucleon/cxxnet/issues\">Github</a>&nbsp;about building problem. It is about your pthread problem on your machine. I guess may be upgrade your gcc will help. But I am not sure because I never use Mac.</p>\n\n\n<p>You can add ```dev = cpu``` at global setting part, I mean no indent</p>\n\n<p>[quote=Jason;61436]</p>\n<p>Thanks for sharing the code. &nbsp;I have a&nbsp;problems when installing cxxnet&nbsp;on Ubuntu 14.04</p>\n<p>$ build.sh blas=1</p>\n<p><code></code><code><code>g++ -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o bin/cxxnet cxxnet/cxxnet_main.cpp cxxnet_data.o cxxnet_nnet_cpu.o cxxnet_nnet_gpu.o -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>/usr/bin/ld: cxxnet_data.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'<br>//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line<br>collect2: error: ld returned 1 exit status<br>make: *** [bin/cxxnet] Error 1<br></code></code></p>\n<p>How could I fix it?</p>\n<p>Meanwhile, do you mean add 'dev=cpu' to&nbsp;bowl.conf ?&nbsp; I didn't find&nbsp; 'dev=cpu' or&nbsp; 'dev=gpu' in any fil</p>\n<p>e. &nbsp;I guess that you are using GPU and it is the default option.</p>\n<p>Many Thanks</p>\n<p>[</p>\n<p>quote=Bing Xu;60440]</p>\n<p>You can, you need blas or MKL installed. Then set dev=cpu in config file</p>\n<p>[quote=Issac;60439]</p>\n<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61438",
      "postDate": "12/18/2014 00:25:02",
      "content": "<p>Many Thanks Bing,</p>\n<p>I give an updated details of my building environment at&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/issues/14\">GitHub issue 14</a></p>\n<p>Cheers.&nbsp;</p>\n\n<p>[quote=Bing Xu;61437]</p>\n<p>I suggest you post in issue on <a href=\"https://github.com/antinucleon/cxxnet/issues\">Github</a>&nbsp;about building problem. It is about your pthread problem on your machine. I guess may be upgrade your gcc will help. But I am not sure because I never use Mac.</p>\n<p>You can add ```dev = cpu``` at global setting part, I mean no indent</p>\n<p>[quote=Jason;61436]</p>\n<p>Thanks for sharing the code. &nbsp;I have a&nbsp;problems when installing cxxnet&nbsp;on Ubuntu 14.04</p>\n<p>$ build.sh blas=1</p>\n<p><code></code><code><code>g++ -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o bin/cxxnet cxxnet/cxxnet_main.cpp cxxnet_data.o cxxnet_nnet_cpu.o cxxnet_nnet_gpu.o -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>/usr/bin/ld: cxxnet_data.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'<br>//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line<br>collect2: error: ld returned 1 exit status<br>make: *** [bin/cxxnet] Error 1<br></code></code></p>\n<p>How could I fix it?</p>\n<p>Meanwhile, do you mean add 'dev=cpu' to&nbsp;bowl.conf ?&nbsp; I didn't find&nbsp; 'dev=cpu' or&nbsp; 'dev=gpu' in any fil</p>\n<p>e. &nbsp;I guess that you are using GPU and it is the default option.</p>\n<p>Many Thanks</p>\n<p>[</p>\n<p>quote=Bing Xu;60440]</p>\n<p>You can, you need blas or MKL installed. Then set dev=cpu in config file</p>\n<p>[quote=Issac;60439]</p>\n<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61442",
      "postDate": "12/18/2014 03:23:38",
      "content": "<p>Hi Bing,</p>\n<p>When I run the gen_train.py function I am getting these warnings &quot;convert is not recognized as an internal or external command&quot;. Are you using a special python package to resize images?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61443",
      "postDate": "12/18/2014 03:25:08",
      "content": "<p>You need install&nbsp;<a href=\"http://www.imagemagick.org/\">http://www.imagemagick.org/</a>&nbsp;to use convert</p>\n<p>[quote=kartal;61442]</p>\n<p>Hi Bing,</p>\n<p>When I run the gen_train.py function I am getting these warnings &quot;convert is not recognized as an internal or external command&quot;. Are you using a special python package to resize images?</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61446",
      "postDate": "12/18/2014 04:39:41",
      "content": "<p>OK thanks I did get gen_train.py to work but when I look at the converted images the original sizes are preserved. They are not 48x48 as suggested.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61447",
      "postDate": "12/18/2014 05:07:59",
      "content": "<p>OK I figured out the problem. Maybe this is due to I am using MinGW in Windows but the correct form of the python code should be as below in order for the resizing to work.</p>\n\n<p>import os<br>import sys<br>import subprocess</p>\n<p>if len(sys.argv) &lt; 3:<br> print &quot;Usage: python gen_train.py input_folder output_folder&quot;<br> exit(1)</p>\n<p>fi = sys.argv[1]<br>fo = sys.argv[2]</p>\n<p>cmd = &quot;convert &quot;<br>classes = os.listdir(fi)</p>\n<p>os.chdir(fo)<br>for cls in classes:<br> try:<br> os.mkdir(cls)<br> except:<br> pass<br> imgs = os.listdir(fi + cls)<br> for img in imgs:<br> md = &quot;&quot;<br> md += cmd<br> md += fi + cls + &quot;/&quot; + img<br> md += &quot; -resize 48x48!&quot;<br> md += &quot; &quot; + fo + cls + &quot;/&quot; + img<br> os.system(md)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61471",
      "postDate": "12/18/2014 11:25:20",
      "content": "<p>Thanks Bing, I just got it working and submitted results.</p>\n<p>For others - I'm using Ubuntu 14.04, and had to muck around with the CXXNet Makefiles a bit, adding -I and -L references to the CUDA library locations.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61497",
      "postDate": "12/18/2014 17:12:16",
      "content": "<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285.</p>\n<p>[/quote]</p>\n\n<p>Before I try to install it, can it be expected to work on an NVIDIA GRID K520? This is an older model with compute capability 3.0.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61503",
      "postDate": "12/18/2014 20:45:31",
      "content": "<p>Hi, Bing,&nbsp;</p>\n<p>I follow your net config file and create a caffe proto file as attached, but it cannot get your result. Is there any difference between your cxxnet and caffe?&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61522",
      "postDate": "12/19/2014 06:10:19",
      "content": "<p>Hi Bing,</p>\n<p>After compiling successfully for cpu and adding the dev=cpu I'm getting this:</p>\n<p><code>$ ../../bin/cxxnet bowl.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=128<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 256,3,48,48<br>node[1].shape: 256,96,12,12<br>node[2].shape: 256,96,12,12<br>node[3].shape: 256,96,6,6<br>node[4].shape: 256,128,8,8<br>node[5].shape: 256,128,8,8<br>node[6].shape: 256,128,8,8<br>node[7].shape: 256,128,8,8<br>node[8].shape: 256,128,4,4<br>node[9].shape: 1,1,256,2048<br>node[10].shape: 1,1,256,512<br>node[11].shape: 1,1,256,512<br>node[12].shape: 1,1,256,512<br>node[13].shape: 1,1,256,512<br>node[14].shape: 1,1,256,121<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 9000] images processed, 1 sec elapsedError:decoding fail</code></p>\n<p>Can you please see what I might do wrong?</p>\n<p>Thanks,</p>\n<p>C</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61523",
      "postDate": "12/19/2014 06:12:01",
      "content": "<p>It means opencv can't decode image in the binary file. I suggest you check your opencv and process in generating binary file.</p>\n<p>[quote=clustifier;61522]</p>\n<p>Hi Bing,</p>\n<p>After compiling successfully for cpu and adding the dev=cpu I'm getting this:</p>\n<p><code>$ ../../bin/cxxnet bowl.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=128<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 256,3,48,48<br>node[1].shape: 256,96,12,12<br>node[2].shape: 256,96,12,12<br>node[3].shape: 256,96,6,6<br>node[4].shape: 256,128,8,8<br>node[5].shape: 256,128,8,8<br>node[6].shape: 256,128,8,8<br>node[7].shape: 256,128,8,8<br>node[8].shape: 256,128,4,4<br>node[9].shape: 1,1,256,2048<br>node[10].shape: 1,1,256,512<br>node[11].shape: 1,1,256,512<br>node[12].shape: 1,1,256,512<br>node[13].shape: 1,1,256,512<br>node[14].shape: 1,1,256,121<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 9000] images processed, 1 sec elapsedError:decoding fail</code></p>\n<p>Can you please see what I might do wrong?</p>\n<p>Thanks,</p>\n<p>C</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61528",
      "postDate": "12/19/2014 08:39:46",
      "content": "<p>It seems you need either Intel MKL or NVIDIA CUDA installed to use this?</p>\n<p>build.sh blas=1 =&gt;</p>\n<p>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found</p>\n<p>MSHADOW_USE_CUDA=0 ./build.sh blas=1 =&gt;</p>\n<p>./mshadow/mshadow/tensor_base.h:282:13: error: use of undeclared identifier 'exit'</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61575",
      "postDate": "12/20/2014 14:48:42",
      "content": "<p>[quote=Michael Bewley;61471]</p>\n<p>Thanks Bing, I just got it working and submitted results.</p>\n<p>For others - I'm using Ubuntu 14.04, and had to muck around with the CXXNet Makefiles a bit, adding -I and -L references to the CUDA library locations.</p>\n<p>[/quote]</p>\n\n<p>Michael, I followed the same path you took but unfortunately, when I run cxxnet bowl.conf, I get a segmentation fault.</p>\n<p>Would you care to confirm the md5sum for the 2 bin files? I get :</p>\n<p>a96b2dc558eb9662b417d9b23ca0fdd4 train.bin</p>\n<p>891b7e1072d146f850d43cad8b0dd808 test.bin</p>\n<p>Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61581",
      "postDate": "12/20/2014 16:07:01",
      "content": "<p>[quote=gregl;61575]</p>\n<p>[quote=Michael Bewley;61471]</p>\n<p>Thanks Bing, I just got it working and submitted results.</p>\n<p>For others - I'm using Ubuntu 14.04, and had to muck around with the CXXNet Makefiles a bit, adding -I and -L references to the CUDA library locations.</p>\n<p>[/quote]</p>\n<p>Michael, I followed the same path you took but unfortunately, when I run cxxnet bowl.conf, I get a segmentation fault.</p>\n<p>Would you care to confirm the md5sum for the 2 bin files? I get :</p>\n<p>a96b2dc558eb9662b417d9b23ca0fdd4 train.bin</p>\n<p>891b7e1072d146f850d43cad8b0dd808 test.bin</p>\n<p>Thanks!</p>\n<p>[/quote]</p>\n<p>For me:</p>\n<p>50cd388bc640b63e2144b551fb6260fd test.bin<br>9f847cc39b7fee93e842a668cd4e72b4 train.bin</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61597",
      "postDate": "12/20/2014 19:22:22",
      "content": "<p>for me:</p>\n<p><code>ff0bee47c19b6c7ab79b29d3c37872b2</code></p>\n<p><code></code><code>79343a11c7f80cd3b8e94712ae42cdc8</code></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61598",
      "postDate": "12/20/2014 19:45:03",
      "content": "<p>I realize the checksum of the bin file is probably irrelevant because machine dependent...</p>\n<p>Anyway I fixed the issue and was able to get the 1.38 score. It seems my problem was to have built opencv <strong>before</strong> installing CUDA.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61599",
      "postDate": "12/20/2014 19:56:25",
      "content": "<p>[quote=gregl;61598]</p>\n<p>I realize the checksum of the bin file is probably irrelevant because machine dependent...</p>\n<p>[/quote]</p>\n<p>I don't think it is true.</p>\n<p>What is your md5&nbsp;checksums now?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61600",
      "postDate": "12/20/2014 20:28:29",
      "content": "<p>[quote=clustifier;61599]</p>\n<p>[quote=gregl;61598]</p>\n<p>I realize the checksum of the bin file is probably irrelevant because machine dependent...</p>\n<p>[/quote]</p>\n<p>I don't think it is true.</p>\n<p>What is your md5&nbsp;checksums now?</p>\n<p>[/quote]</p>\n\n<p>Same as before. im2bin was working all along for me, only cxxnet was not.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61601",
      "postDate": "12/20/2014 21:18:16",
      "content": "<p>thanks.</p>\n<p>but why our md5's are different?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61632",
      "postDate": "12/21/2014 19:34:01",
      "content": "<p>[quote=clustifier;61601]</p>\n<p>thanks.</p>\n<p>but why our md5's are different?</p>\n<p>[/quote]</p>\n\n<p>I built im2bin with blas, not the default mlk.</p>\n<p>Also, upstream, the md5sum of train.lst is:</p>\n<p>399ab27e818cabcb5bd2158c15451a80 train.lst</p>\n<p>with the first 5 lines:</p>\n<p>3406 10 data/train/chaetognath_non_sagitta/23677.jpg<br>22212 90 data/train/radiolarian_chain/157296.jpg<br>19772 83 data/train/protist_fuzzy_olive/147898.jpg<br>23435 98 data/train/siphonophore_calycophoran_rocketship_young/36262.jpg<br>18710 72 data/train/hydromedusae_solmaris/47760.jpg</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61633",
      "postDate": "12/21/2014 19:44:41",
      "content": "<p>My train.lst is different. I think the issue is that os.listdir does not guarantee any ordering of the results.</p>\n<p>[quote=gregl;61632]</p>\n<p>[quote=clustifier;61601]</p>\n<p>thanks.</p>\n<p>but why our md5's are different?</p>\n<p>[/quote]</p>\n<p>I built im2bin with blas, not the default mlk.</p>\n<p>Also, upstream, the md5sum of train.lst is:</p>\n<p>399ab27e818cabcb5bd2158c15451a80 train.lst</p>\n<p>with the first 5 lines:</p>\n<p>3406 10 data/train/chaetognath_non_sagitta/23677.jpg<br>22212 90 data/train/radiolarian_chain/157296.jpg<br>19772 83 data/train/protist_fuzzy_olive/147898.jpg<br>23435 98 data/train/siphonophore_calycophoran_rocketship_young/36262.jpg<br>18710 72 data/train/hydromedusae_solmaris/47760.jpg</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61726",
      "postDate": "12/23/2014 01:56:21",
      "content": "<p>Include stdlib.h in tensor_base.h to fix the error about 'exit'.</p>\n\n\n<p>[quote=Synthient;61528]</p>\n<p>It seems you need either Intel MKL or NVIDIA CUDA installed to use this?</p>\n<p>build.sh blas=1 =&gt;</p>\n<p>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found</p>\n<p>MSHADOW_USE_CUDA=0 ./build.sh blas=1 =&gt;</p>\n<p>./mshadow/mshadow/tensor_base.h:282:13: error: use of undeclared identifier 'exit'</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61732",
      "postDate": "12/23/2014 05:19:24",
      "content": "<p>Hi, this is quite interesting.&nbsp;CXXNET was way easier to setup compared to caffe. I have some quick questions about CXXNET though:</p>\n<p>- is it possible to resume training from a saved model file?</p>\n<p>- is it possible to extract features from a particular layer?</p>\n<p>- is there some documentation about what the various parameters in the config file mean? eg. wmat:wd</p>\n<p>- how is the performance of cxxnet vs caffe?</p>\n\n\n<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61733",
      "postDate": "12/23/2014 05:53:49",
      "content": "<p>Please refer to the wiki on Github&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/wiki\">https://github.com/antinucleon/cxxnet/wiki</a></p>\n<p>[quote=Nissan Pow;61732]</p>\n<p>Hi, this is quite interesting.&nbsp;CXXNET was way easier to setup compared to caffe. I have some quick questions about CXXNET though:</p>\n<p>- is it possible to resume training from a saved model file?</p>\n<p>- is it possible to extract features from a particular layer?</p>\n<p>- is there some documentation about what the various parameters in the config file mean? eg. wmat:wd</p>\n<p>- how is the performance of cxxnet vs caffe?</p>\n<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61783",
      "postDate": "12/23/2014 22:04:51",
      "content": "<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61786",
      "postDate": "12/23/2014 22:18:49",
      "content": "<p>[quote=clustifier;61783]</p>\n<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>\n<p>[/quote]</p>\n<p>Nope, trying though... can't seem to get by the includes. The file cblas.h is actually part of the Accelerate framework on the Mac, but now we are trying to find cublas.h. Fetched mshadow just fine...</p>\n<p>====================================================================</p>\n<p>$ MSHADOW_USE_CUDA=0 ./build.sh blas=1</p>\n<p>g++ -c -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -I/usr/lib -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o cxxnet_data.o cxxnet/io/cxxnet_data.cpp<br>In file included from cxxnet/io/cxxnet_data.cpp:6:<br>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found<br> #include &lt;cublas.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61792",
      "postDate": "12/23/2014 23:22:58",
      "content": "<p>Yes, I'm using it on 10.10 with cuda. Where are you stuck at?</p>\n\n<p>[quote=clustifier;61783]</p>\n<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61793",
      "postDate": "12/23/2014 23:24:25",
      "content": "<p>cublas.h is located at&nbsp;/usr/local/cuda/include/, which is a symlink to&nbsp;/Developer/NVIDIA/CUDA-6.5/include for me.</p>\n<p>Add -I/usr/local/cuda/include/ to your Makefile.</p>\n\n\n<p>[quote=Mark Conway;61786]</p>\n<p>[quote=clustifier;61783]</p>\n<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>\n<p>[/quote]</p>\n<p>Nope, trying though... can't seem to get by the includes. The file cblas.h is actually part of the Accelerate framework on the Mac, but now we are trying to find cublas.h. Fetched mshadow just fine...</p>\n<p>====================================================================</p>\n<p>$ MSHADOW_USE_CUDA=0 ./build.sh blas=1</p>\n<p>g++ -c -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -I/usr/lib -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o cxxnet_data.o cxxnet/io/cxxnet_data.cpp<br>In file included from cxxnet/io/cxxnet_data.cpp:6:<br>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found<br> #include &lt;cublas.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61828",
      "postDate": "12/24/2014 14:51:04",
      "content": "<p>Hi, anyone here uses MacOS and successfully install CXXNET? I tried to but met tons of ERRORs T.T</p>\n<p>------------------------</p>\n<p>First I use 'brew install' to get opencv and installed CUDA toolbox. Then I run ' sudo ./build.sh blas=1' and failed with 'cannot found cblas.h'. I googled cblas and found it is included in Mac's Accelerate framework. So I naively thought replacing cblas.h with&nbsp;Accelerate.h will solve this problem.</p>\n<p><code>#if MSHADOW_USE_CBLAS<br>#include Accelerate/Accelerate.h</code></p>\n<p>------------------------</p>\n<p>Then I met following error:</p>\n<p><code>/usr/include/dispatch/object.h(143): error: expected an identifier</code><code>/usr/include/dispatch/object.h(362): error: identifier &quot;dispatch_block_t&quot; is undefined</code><code>/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBundle.h(148): error: format argument does not have string type</code></p>\n<p>I solved this under the guide in :http://stackoverflow.com/questions/26527077/compiling-with-accelerate-framework-on-osx-yosemite</p>\n<p>------------------------</p>\n<p>Then this error occurs: 'ld: library not found for -lcudart' this is easy to solve, just edit the -I and -L args. on my macbook it is:</p>\n<p>-I/Developer/NVIDIA/CUDA-6.5/include/ -L/Developer/NVIDIA/CUDA-6.5/lib</p>\n<p>------------------------</p>\n<p>Then I got this error:</p>\n<p><code>Undefined symbols for architecture x86_64:<br> &quot;std::string::_Rep::_M_destroy(std::allocator&lt;char&gt; const&amp;)&quot;, referenced from:<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br>......<br>std::vector&lt;cxxnet::ILayer*, std::allocator&lt;cxxnet::ILayer*&gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::ILayer**, std::vector&lt;cxxnet::ILayer*, std::allocator&lt;cxxnet::ILayer*&gt; &gt; &gt;, cxxnet::ILayer* const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;cxxnet::Node&lt;mshadow::gpu&gt;, std::allocator&lt;cxxnet::Node&lt;mshadow::gpu&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::Node&lt;mshadow::gpu&gt;*, std::vector&lt;cxxnet::Node&lt;mshadow::gpu&gt;, std::allocator&lt;cxxnet::Node&lt;mshadow::gpu&gt; &gt; &gt; &gt;, cxxnet::Node&lt;mshadow::gpu&gt; const&amp;) in cxxnet_nnet_gpu.o<br> ...<br>ld: symbol(s) not found for architecture x86_64</code></p>\n<p>I googled it and found this may due to the update of xcode from 5.x to 6.0(I use the newest xcode). And I have no idea how to fix it.</p>\n<p>------------------------</p>\n<p>Finally I give up using cblas and turn to mkl in&nbsp;https://software.intel.com/en-us/intel-parallel-studio-xe. Currently I am downloading the 30days free trial for XE (does XE have a free version for student? I could not find any link to it)</p>\n<p>------------------------</p>\n<p>update: I installed OpenBLAS and add '-I/opt/OpenBLAS/include' in makefile but still got an 'ld: symbol(s) not found for architecture x86_64' error. it seems CXXNET just cannot run on newest MacOS/xcode. Now I have give up and found&nbsp;alternatives.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61830",
      "postDate": "12/24/2014 15:15:35",
      "content": "<p>I took the same route you did. I installed Intel Parallel Studio to get MKL, then set up all the include paths, and was able to at least compile some of the objects. But then the make was trying to compile with &quot;nvcc&quot; to create the cxxnet executable and that died a horrible death. I gave up after a few hours... it was like hacking through the jungle with a machete. Best of luck!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61848",
      "postDate": "12/25/2014 01:25:02",
      "content": "<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>May I ask about the training NLL and the distribution of predicted labels for test data?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61849",
      "postDate": "12/25/2014 01:29:09",
      "content": "<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>May I ask about the training NLL and the distribution of predicted labels for test data?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61887",
      "postDate": "12/26/2014 02:20:38",
      "content": "<p>Hi Bing:</p>\n<p>Running on Mac Yosemite, got everything built, converted the images, but now getting the following error:</p>\n<p><strong>Error:Assignment: Shape of Tensors in expression is not consistent with target</strong></p>\n<p>localhost:kaggle_bowl$ ../../bin/cxxnet bowl.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=128<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 256,3,48,48<br>node[1].shape: 256,96,12,12<br>node[2].shape: 256,96,12,12<br>node[3].shape: 256,96,6,6<br>node[4].shape: 256,128,8,8<br>node[5].shape: 256,128,8,8<br>node[6].shape: 256,128,8,8<br>node[7].shape: 256,128,8,8<br>node[8].shape: 256,128,4,4<br>node[9].shape: 1,1,256,2048<br>node[10].shape: 1,1,256,512<br>node[11].shape: 1,1,256,512<br>node[12].shape: 1,1,256,512<br>node[13].shape: 1,1,256,512<br>node[14].shape: 1,1,256,121<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br><strong>Error:Assignment: Shape of Tensors in expression is not consistent with target</strong></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61917",
      "postDate": "12/26/2014 21:30:33",
      "content": "<p>I have couple of&nbsp;questions with cxxnet/convert tools. First, why &quot;convert -resize 48x48\\!&quot; has exclamation mark? I can't find anything in convert/ImageMagik documentation. If I remove it I got similar error as Mark Conway posted, if I keep it I don't have this issue. Second question, when I run cxxnet with default configuration, it exit with the following:</p>\n<p><code>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 30000] images processed, 1 sec elapsedsave mean image to models/image_mean.bin..<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>loading mean image from models/image_mean.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>update round 0</code></p>\n<p>and only generates models/0000.model file and models/image_mean.bin? The exit status I get (I printed via echo $?) is 1. No other messages. I don't know what's going wrong, do I have insufficient RAM or program is crashed? The code uses&nbsp;Quadro NVS 295 GPU.</p>\n<p>Thanks,</p>\n<p>Valentin</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61919",
      "postDate": "12/26/2014 23:01:27",
      "content": "<p>The exclamation mark means ignore aspect ratio:</p>\n<p>[quote]</p>\n<p>Ignore Aspect Ratio ('!' flag)<br>If you want you can force &quot;-resize&quot; to ignore the aspect ratio and distort the image so it always generates an image exactly the size specified. This is done by adding the character '!' to the size. Unfortunately this character is also sometimes used for special purposes by various UNIX command line shells. So you may have to escape the character somehow to preserve it.</p>\n<p>[/quote]</p>\n<p>Reference: http://www.imagemagick.org/Usage/resize/</p>\n\n<p>[quote=vk.net;61917]</p>\n<p>why &quot;convert -resize 48x48\\!&quot; has exclamation mark?</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61929",
      "postDate": "12/27/2014 13:12:12",
      "content": "<p>I've written a summary of the installation of cxxnet on CentOS via blas, based on the error I've encountered during the installation.&nbsp;</p>\n<p>Here is the summary:&nbsp;<a href=\"https://github.com/billy-inn/cxxnet/tree/master/Install\">https://github.com/billy-inn/cxxnet/tree/master/Install</a></p>\n<p>Hope it may help.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61934",
      "postDate": "12/27/2014 15:26:39",
      "content": "<p>Hi Valentin:</p>\n<p>I'm getting pretty close. I believe the &quot;Shape of Tensors not consistent&quot; error is related to the image list processed by cxxnet, as you point out. So, I will experiment with the convert options and see if we can finish this last step.</p>\n<p>Regards,</p>\n<p>Mark</p>\n<p>[quote=vk.net;61917]</p>\n<p>I have couple of&nbsp;questions with cxxnet/convert tools. First, why &quot;convert -resize 48x48\\!&quot; has exclamation mark? I can't find anything in convert/ImageMagik documentation. If I remove it I got similar error as Mark Conway posted, if I keep it I don't have this issue. Second question, when I run cxxnet with default configuration, it exit with the following:</p>\n<p><code>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 30000] images processed, 1 sec elapsedsave mean image to models/image_mean.bin..<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>loading mean image from models/image_mean.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>update round 0</code></p>\n<p>and only generates models/0000.model file and models/image_mean.bin? The exit status I get (I printed via echo $?) is 1. No other messages. I don't know what's going wrong, do I have insufficient RAM or program is crashed? The code uses&nbsp;Quadro NVS 295 GPU.</p>\n<p>Thanks,</p>\n<p>Valentin</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62072",
      "postDate": "12/30/2014 00:17:00",
      "content": "<p>Nissan, can you elaborate where to add -I/usr/local/cuda/include in the Makefile? I'm a noob so it isn't obvious. :)</p>\n<p>[quote=Nissan Pow;61793]</p>\n<p>cublas.h is located at&nbsp;/usr/local/cuda/include/, which is a symlink to&nbsp;/Developer/NVIDIA/CUDA-6.5/include for me.</p>\n<p>Add -I/usr/local/cuda/include/ to your Makefile.</p>\n<p>[quote=Mark Conway;61786]</p>\n<p>[quote=clustifier;61783]</p>\n<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>\n<p>[/quote]</p>\n<p>Nope, trying though... can't seem to get by the includes. The file cblas.h is actually part of the Accelerate framework on the Mac, but now we are trying to find cublas.h. Fetched mshadow just fine...</p>\n<p>====================================================================</p>\n<p>$ MSHADOW_USE_CUDA=0 ./build.sh blas=1</p>\n<p>g++ -c -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -I/usr/lib -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o cxxnet_data.o cxxnet/io/cxxnet_data.cpp<br>In file included from cxxnet/io/cxxnet_data.cpp:6:<br>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found<br> #include &lt;cublas.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62073",
      "postDate": "12/30/2014 00:45:14",
      "content": "<p>Here the part of Makefile I modified:</p>\n<p><code>export CFLAGS = -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/<br>CFLAGS+=-I/opt/cuda/include</code></p>\n<p><code>ifeq ($(blas),1)<br> LDFLAGS= -L/opt/cuda/lib -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lcblas -lgfortran -lblas<br> CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1<br>else<br> LDFLAGS= -lm -lcudart -lcublas -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lpthread -lcurand -lz `pkg-config --libs opencv`<br>endif</code></p>\n<p>Basically you add additional CFLAGS with you CUDA include path and modiy LDFLAGS as well with path to CUDA libraries. The CUDA toolkit (https://developer.nvidia.com/cuda-toolkit) comes from NVidia web site and it includes cublas.h</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62083",
      "postDate": "12/30/2014 04:34:15",
      "content": "<p>Thanks Bing for this eye opening example by running it&nbsp; with GPU Cuda cores.</p>\n<p>As much as I can follow you use one of Linux flavor to utilize GPU and maybe some other people has success on MacOS. I can run your examples on CPU on Ubuntu VM with vmplayer on a Win8.1 host however I wonder whether I can utilize host Nvidia GPU tied to host Win8.1. Is there Anybody managed to run this on Win8.1 OS with GPU? There is a MinGW solution: http://pavel.surmenok.com/2014/05/31/installing-theano-with-gpu-on-windows-64-bit/</p>\n<p>but not yet tried maybe somebody can point a better, like cygwin possibility?</p>\n<p>Thanks</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62150",
      "postDate": "12/31/2014 21:30:13",
      "content": "<p>Hi everyone, finally I installed cxxnet on my laptop, which has a low-end Geforce GT 630m graphic card. The score is 1.42 and the training time is one hour. But I'm still happy it works. Thank you, Bing! :D</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62194",
      "postDate": "01/01/2015 23:43:31",
      "content": "<p>I am using a CNN approach using Caffe rather than cxxnet.&nbsp; My network structure is very similar to what is defined in Bing's shared code.&nbsp; Out of interest, can anyone tell me how many training iterations the cxxnet code runs for?&nbsp; I can't seem to see where that is defined in the code.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62204",
      "postDate": "01/02/2015 07:29:46",
      "content": "<p>[quote=Senecaur;62194]</p>\n<p>I am using a CNN approach using Caffe rather than cxxnet.&nbsp; My network structure is very similar to what is defined in Bing's shared code.&nbsp; Out of interest, can anyone tell me how many training iterations the cxxnet code runs for?&nbsp; I can't seem to see where that is defined in the code.</p>\n<p>[/quote]</p>\n\n<p>45 in Bing's example. The entries in the .conf file are &quot;max_round&quot; and &quot;num_round&quot;.</p>\n\n<p>G</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62214",
      "postDate": "01/02/2015 14:56:46",
      "content": "<p>[quote=gregl;61632]</p>\n<p>[quote=clustifier;61601]</p>\n<p>thanks.</p>\n<p>but why our md5's are different?</p>\n<p>[/quote]</p>\n<p>I built im2bin with blas, not the default mlk.</p>\n<p>Also, upstream, the md5sum of train.lst is:</p>\n<p>399ab27e818cabcb5bd2158c15451a80 train.lst</p>\n<p>with the first 5 lines:</p>\n<p>3406 10 data/train/chaetognath_non_sagitta/23677.jpg<br>22212 90 data/train/radiolarian_chain/157296.jpg<br>19772 83 data/train/protist_fuzzy_olive/147898.jpg<br>23435 98 data/train/siphonophore_calycophoran_rocketship_young/36262.jpg<br>18710 72 data/train/hydromedusae_solmaris/47760.jpg</p>\n<p>[/quote]</p>\n<p>how did you build im2bin with blas when mshadow needs mkl?</p>\n\n<p>EDIT: Nevermind</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62236",
      "postDate": "01/03/2015 17:39:20",
      "content": "<p>Hi Valentin,</p>\n<p>in case you're still having the issue you described in your second question, I had exactly the same with a GTX 680 GPU.</p>\n<p>I discovered a warning during the compilation of 'tensor_gpu-inl.cuh' which is part of mshadow and located in 'cxxnet-master/mshadow/mshadow/cuda'. The warning said that the CUDA architecture of the GPU could not be determined and will be set to 2.0 automatically. It seemed that the __CUDA_ARCH__ macro, that is checked for the architecture, was broken. Setting this macro by hand like</p>\n<p>#define __CUDA_ARCH__ 300</p>\n<p>resolved the issue for me (in my case, the 300 comes from the GTX 680 having compute capability 3.0). Maybe this can help with your problem too...</p>\n<p>Best,</p>\n<p>Matthias</p>\n<p>p.s.: Thanks a lot Bing for making this available!</p>\n<p>[quote=vk.net;61917]</p>\n<p>Second question, when I run cxxnet with default configuration, it exit with the following:</p>\n<p><code>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 30000] images processed, 1 sec elapsedsave mean image to models/image_mean.bin..<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>loading mean image from models/image_mean.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>update round 0</code></p>\n<p>and only generates models/0000.model file and models/image_mean.bin? The exit status I get (I printed via echo $?) is 1. No other messages. I don't know what's going wrong, do I have insufficient RAM or program is crashed? The code uses&nbsp;Quadro NVS 295 GPU.</p>\n<p>Thanks,</p>\n<p>Valentin</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62285",
      "postDate": "01/05/2015 03:08:59",
      "content": "<p>[quote=vk.net;62073]</p>\n<p>Here the part of Makefile I modified:</p>\n<p><code>export CFLAGS = -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/<br>CFLAGS+=-I/opt/cuda/include</code></p>\n<p><code>ifeq ($(blas),1)<br> LDFLAGS= -L/opt/cuda/lib -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lcblas -lgfortran -lblas<br> CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1<br>else<br> LDFLAGS= -lm -lcudart -lcublas -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lpthread -lcurand -lz `pkg-config --libs opencv`<br>endif</code></p>\n<p>Basically you add additional CFLAGS with you CUDA include path and modiy LDFLAGS as well with path to CUDA libraries. The CUDA toolkit (https://developer.nvidia.com/cuda-toolkit) comes from NVidia web site and it includes cublas.h</p>\n<p>[/quote]</p>\n\n<p>Thanks for the advice; this resolved the cublas issue. &nbsp;I was wondering if it worked for you with just that, though; after making the modification, I now get&nbsp;</p>\n<p>sh build.sh blas=1</p>\n<p><br>Fetch mshadow...<br>fatal: destination path 'mshadow' already exists and is not an empty directory.<br>nvcc -c -o cxxnet_nnet_gpu.o --use_fast_math -g -O3 -ccbin g++ -Xcompiler &quot;-Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -I/usr/local/cuda/include -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1&quot; cxxnet/nnet/cxxnet_nnet.cu<br>/bin/sh: 1: nvcc: not found<br>make: *** [cxxnet_nnet_gpu.o] Error 127</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62286",
      "postDate": "01/05/2015 03:58:17",
      "content": "<p>Torgos, looks like you havn't added CUDA to your path?? i.e. something like:</p>\n<p>export PATH=$PATH:/usr/local/cuda-6.5/bin<br>export&nbsp;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-6.5/lib64:/usr/local/cuda-6.5/include</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62302",
      "postDate": "01/05/2015 16:44:08",
      "content": "<p>Right you are; I thought I had added it to my bashrc. &nbsp;Thanks!</p>\n<p>Edit.Unfortunately still seems to be broken, though. &nbsp;Blargh. &nbsp;Has anyone gotten this installed on a Ubuntu 14.04 on an Amazon GPU instance?</p>\n<p>Edit 2: &nbsp;I think I got it; &nbsp;the ubuntu distribution is 64 bit, so you will get compatibility issues with the 32 bit library; point the makefile at&nbsp;-L/usr/local/cuda/lib64 instead. &nbsp;You also need to add the -pthread to</p>\n<p>CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -pthread</p>\n<p>as per</p>\n<p>https://github.com/antinucleon/cxxnet/issues/14</p>\n<p>No errors (other than 'mshadow already exists') when running&nbsp;sh build.sh blas=1 after that. &nbsp;Still need to figure out what paths to change the Makefile for im2bin, though.</p>\n<p>Edit 3. &nbsp;Modify the first few lines in the im2bin Makefile to&nbsp;</p>\n<p>export CFLAGS = -Wall -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I../mshadow/ -I..</p>\n<p>CFLAGS+=-I/usr/local/cuda/include<br>export LDFLAGS=-L/usr/local/cuda/lib64 -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>export NVCCFLAGS = -g -O3 -ccbin $(CXX)<br>CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -pthread</p>\n\n<p>It should compile correctly now; unfortunately, the actual command doesn't work! I suspect that the issue was in the argument passed when train.lst was generated.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62324",
      "postDate": "01/06/2015 02:34:55",
      "content": "<p>Did anyone get it running on the Macbook on OSX? &nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62328",
      "postDate": "01/06/2015 04:55:00",
      "content": "<p>I stumbled across this on the caffe github repo&nbsp;today:</p>\n<p>&quot;Be aware of the competing fast GPU neural network library CXXNET&quot;</p>\n<p>https://github.com/BVLC/caffe/issues/382</p>\n<p>I am so impressed with with what Tianqi and Bing have accomplished with cxxnet and xgboost. Please, keep doing what you're doing!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62332",
      "postDate": "01/06/2015 06:50:55",
      "content": "<p>Okay, I got past a few problems but now I'm running into this:</p>\n<p>Undefined symbols for architecture x86_64:<br> &quot;std::string::_Rep::_M_destroy(std::allocator&lt;char&gt; const&amp;)&quot;, referenced from:<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::~SGHMCUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::~SGDUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::~SGDUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::~SGHMCUpdater() in cxxnet_nnet_gpu.o<br> ...<br> &quot;std::string::_Rep::_S_empty_rep_storage&quot;, referenced from:<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::~SGHMCUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::~SGDUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::~SGDUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::~SGHMCUpdater() in cxxnet_nnet_gpu.o<br> ...<br> &quot;std::string::assign(char const*, unsigned long)&quot;, referenced from:<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 3&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 2&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 2&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 2&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 2&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 2&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 2&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::utils::MetricSet::AddMetric(char const*) in cxxnet_nnet_gpu.o<br> ...<br> &quot;std::string::assign(std::string const&amp;)&quot;, referenced from:<br> std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::allocator&lt;std::pair&lt;std::string, std::string&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;std::pair&lt;std::string, std::string&gt;*, std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::allocator&lt;std::pair&lt;std::string, std::string&gt; &gt; &gt; &gt;, std::pair&lt;std::string, std::string&gt; const&amp;) in cxxnet_nnet_gpu.o<br> &quot;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::basic_string(char const*, std::allocator&lt;char&gt; const&amp;)&quot;, referenced from:<br> cxxnet::NetConfigHelper::SetParam(char const*, char const*) in cxxnet_nnet_gpu.o<br> &quot;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::basic_string(std::string const&amp;)&quot;, referenced from:<br> cxxnet::NetConfigHelper::SetParam(char const*, char const*) in cxxnet_nnet_gpu.o<br> std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::allocator&lt;std::pair&lt;std::string, std::string&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;std::pair&lt;std::string, std::string&gt;*, std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::allocator&lt;std::pair&lt;std::string, std::string&gt; &gt; &gt; &gt;, std::pair&lt;std::string, std::string&gt; const&amp;) in cxxnet_nnet_gpu.o<br> &quot;std::__throw_length_error(char const*)&quot;, referenced from:<br> std::vector&lt;float, std::allocator&lt;float&gt; &gt;::_M_fill_insert(__gnu_cxx::__normal_iterator&lt;float*, std::vector&lt;float, std::allocator&lt;float&gt; &gt; &gt;, unsigned long, float const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt;, std::allocator&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt; &gt; &gt;::_M_fill_insert(__gnu_cxx::__normal_iterator&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt;*, std::vector&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt;, std::allocator&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt; &gt; &gt; &gt;, unsigned long, std::vector&lt;float, std::allocator&lt;float&gt; &gt; const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;float, std::allocator&lt;float&gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;float*, std::vector&lt;float, std::allocator&lt;float&gt; &gt; &gt;, float const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;int, std::allocator&lt;int&gt; &gt;::_M_fill_insert(__gnu_cxx::__normal_iterator&lt;int*, std::vector&lt;int, std::allocator&lt;int&gt; &gt; &gt;, unsigned long, int const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;cxxnet::IUpdater*, std::allocator&lt;cxxnet::IUpdater*&gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::IUpdater**, std::vector&lt;cxxnet::IUpdater*, std::allocator&lt;cxxnet::IUpdater*&gt; &gt; &gt;, cxxnet::IUpdater* const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;cxxnet::ILayer*, std::allocator&lt;cxxnet::ILayer*&gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::ILayer**, std::vector&lt;cxxnet::ILayer*, std::allocator&lt;cxxnet::ILayer*&gt; &gt; &gt;, cxxnet::ILayer* const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;cxxnet::Node&lt;mshadow::gpu&gt;, std::allocator&lt;cxxnet::Node&lt;mshadow::gpu&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::Node&lt;mshadow::gpu&gt;*, std::vector&lt;cxxnet::Node&lt;mshadow::gpu&gt;, std::allocator&lt;cxxnet::Node&lt;mshadow::gpu&gt; &gt; &gt; &gt;, cxxnet::Node&lt;mshadow::gpu&gt; const&amp;) in cxxnet_nnet_gpu.o<br> ...<br>ld: symbol(s) not found for architecture x86_64<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>make: *** [bin/cxxnet] Error 1</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62334",
      "postDate": "01/06/2015 09:08:50",
      "content": "<p>[quote=Torgos;62302]</p>\n<p>Edit 3. &nbsp;Modify the first few lines in the im2bin Makefile to&nbsp;</p>\n<p>export CFLAGS = -Wall -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I../mshadow/ -I..</p>\n<p>CFLAGS+=-I/usr/local/cuda/include<br>export LDFLAGS=-L/usr/local/cuda/lib64 -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>export NVCCFLAGS = -g -O3 -ccbin $(CXX)<br>CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -pthread</p>\n<p>It should compile correctly now; unfortunately, the actual command doesn't work! I suspect that the issue was in the argument passed when train.lst was generated.</p>\n<p>[/quote]<br><br>This bit worked for me. Thanks.<br><br>At first the command didn't work for me either and I was wondering why. Turns out there was a permissions issue cos I compiled the im2bin on an mounted NTFS partition instead of EXT. Ended up moving the executable to the EXT partition, gave chmod +x and command ran smoothly.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62346",
      "postDate": "01/06/2015 12:58:44",
      "content": "<p>To&nbsp;Matthias: indeed you found a remedy. I applied macro definition and recompiled the code. Now it runs!!! So, for those who experience silent crash, just follow&nbsp;Matthias advice and define&nbsp;__CUDA_ARCH__ in&nbsp;cxxnet/mshadow/mshadow/cuda/tensor_gpu-inl.cuh file.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62347",
      "postDate": "01/06/2015 13:00:13",
      "content": "<p>is it possible to compile CXXNET without OpenCV?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62378",
      "postDate": "01/06/2015 20:28:32",
      "content": "<p>I'm trying to get this running on a Macbook. &nbsp;What version of OpenCV is everyone using? &nbsp;I have version 2.4.9 and I'm getting this error:</p>\n\n<p>Undefined symbols for architecture x86_64:<br> &quot;cv::imread(std::string const&amp;, int)&quot;, referenced from:<br> cxxnet::ImageIterator::LoadImage(mshadow::TensorContainer&lt;mshadow::cpu, 3&gt;&amp;, cxxnet::DataInst&amp;, char const*) in cxxnet_data.o<br>ld: symbol(s) not found for architecture x86_64<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>make: *** [bin/cxxnet] Error 1</p>\n\n<p>Any ideas?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62410",
      "postDate": "01/07/2015 17:22:19",
      "content": "<p>Hi, when I run the code, it produces the output with train-error values for each round. Can someone explain how they're defined.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62509",
      "postDate": "01/09/2015 16:23:15",
      "content": "<p>Hello,</p>\n<p>I finally got the code compiled and linked, although a cpu version, because I have no GPU at the moment. I got the training done and&nbsp;found the 45 models in the models directory as expected along with the image means.</p>\n<p><strong>$</strong> ../../bin/cxxnet bowl_48x48.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>.</p>\n<p>[<em>output removed</em>]</p>\n<p>.</p>\n<p>ThreadImagePageIterator:image_list=./train_48x48.lst, bin=./train_48x48.bin<br>cannot find models/image_mean_48x48.bin: create mean image, this will take some time...<br>[ 30000] images processed, 1 sec elapsedsave mean image to models/image_mean_48x48.bin..<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./train_48x48.lst, bin=./train_48x48.bin<br>loading mean image from models/image_mean_48x48.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>round 0:[ 100] 246 sec elapsed[1] train-error:0.797901<br>.</p>\n<p>[<em>output removed</em>]</p>\n<p>.<br>round 44:[ 100] 20950 sec elapsed[45] train-error:0.352688</p>\n<p>updating end, 21135 sec in all</p>\n<p>Next, I invoked the predictor. It continues for a while and then halts with an error&nbsp;<strong>Error:decoding fail</strong>&nbsp;as seen in the trace below. I have the output txt file, where I see 67400 images were processed. Inspecting the code, I found that error message in the file&nbsp;<strong>cxxnet_iter_thread_imbin-inl.hpp</strong>, line 65, function&nbsp;<strong>inline static void LoadImage()</strong>.</p>\n<p><strong>$</strong> ../../bin/cxxnet pred_48x48.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=100<br>ConvolutionLayer: nstep=100<br>ConvolutionLayer: nstep=100<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 100,3,48,48<br>node[1].shape: 100,96,12,12<br>node[2].shape: 100,96,12,12<br>node[3].shape: 100,96,6,6<br>node[4].shape: 100,128,8,8<br>node[5].shape: 100,128,8,8<br>node[6].shape: 100,128,8,8<br>node[7].shape: 100,128,8,8<br>node[8].shape: 100,128,4,4<br>node[9].shape: 1,1,100,2048<br>node[10].shape: 1,1,100,512<br>node[11].shape: 1,1,100,512<br>node[12].shape: 1,1,100,512<br>node[13].shape: 1,1,100,512<br>node[14].shape: 1,1,100,121<br>ThreadImagePageIterator:image_list=./train_48x48.lst, bin=./train_48x48.bin<br>loading mean image from models/image_mean_48x48.bin<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./test_48x48.lst, bin=./test_48x48.bin<br>loading mean image from models/image_mean_48x48.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>start predicting...<br><strong>Error:decoding fail</strong></p>\n<p>&nbsp;I am suspecting something went wrong during the conversion and subsequently during loading of the images. Did anyone come across this situation? Any hints?</p>\n<p>Thanks.</p>\n\n<p><strong>Edit: </strong>Tried out again. It works.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62815",
      "postDate": "01/17/2015 06:15:31",
      "content": "<p>Hi Mark, Can you give a brief description on how you managed to build on mac? Thank you.</p>\n<p>[quote=Mark Conway;61887]</p>\n<p>Hi Bing:</p>\n<p>Running on Mac Yosemite, got everything built, converted the images, but now getting the following error:</p>\n<p><strong>Error:Assignment: Shape of Tensors in expression is not consistent with target</strong></p>\n<p>localhost:kaggle_bowl$ ../../bin/cxxnet bowl.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=128<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 256,3,48,48<br>node[1].shape: 256,96,12,12<br>node[2].shape: 256,96,12,12<br>node[3].shape: 256,96,6,6<br>node[4].shape: 256,128,8,8<br>node[5].shape: 256,128,8,8<br>node[6].shape: 256,128,8,8<br>node[7].shape: 256,128,8,8<br>node[8].shape: 256,128,4,4<br>node[9].shape: 1,1,256,2048<br>node[10].shape: 1,1,256,512<br>node[11].shape: 1,1,256,512<br>node[12].shape: 1,1,256,512<br>node[13].shape: 1,1,256,512<br>node[14].shape: 1,1,256,121<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br><strong>Error:Assignment: Shape of Tensors in expression is not consistent with target</strong></p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62917",
      "postDate": "01/19/2015 23:03:27",
      "content": "<p>Just in case it's of help to anyone is still having&nbsp;the below opencv x86_64 error on Mac with the latest XCode, I managed to get it compiling on mine by re-compiling opencv to use&nbsp;-stdlib=libstdc++ instead of the default&nbsp;-stdlib=libc++, via the shortcut of re-installing it with the following command:</p>\n<p>&quot;brew reinstall opencv --with-cuda&quot;</p>\n<p>(if you do a &quot;brew edit opencv&quot; you'll notice it's turning on&nbsp;-stdlib=libstdc++ when the cuda option is set). you of course need to have the cuda stuff installed as well</p>\n<p>I built cxxnet with blas=1 and had these settings in the Makefile (though perhaps not all are needed, since I was messing around with it for a while)</p>\n<p>LDFLAGS= -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` `pkg-config --libs openblas` -lblas -L/usr/local/cuda/lib<br> CFLAGS+= -stdlib=libstdc++ -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_CUDA=1 -I/usr/local/Cellar/openblas/0.2.13/include -I/usr/local/cuda/include</p>\n<p>-----</p>\n<p>Undefined symbols for architecture x86_64:<br>&quot;cv::imread(std::string const&amp;, int)&quot;, referenced from:</p>\n<p>-----</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62936",
      "postDate": "01/20/2015 19:25:41",
      "content": "<p>Wow. &nbsp;Thank you so much Ash. &nbsp;I've been blocked by this error for quite some time.&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63180",
      "postDate": "01/26/2015 08:02:06",
      "content": "<p>Hi Bing,</p>\n<p>Thank you for sharing the guide.</p>\n<p><br>In the config file you set image shape to (3,48,48). As I can understand &quot;3&quot; is a number of input&nbsp;channels. But images in dataset is in gray-scale and have only one channel. How you convert from 1 to 3 channels? Is it just a copy?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63204",
      "postDate": "01/26/2015 20:21:06",
      "content": "<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[quote=Oleksandr Baiev;63180]</p>\n<p>Hi Bing,</p>\n<p>Thank you for sharing the guide.</p>\n<p><br>In the config file you set image shape to (3,48,48). As I can understand &quot;3&quot; is a number of input&nbsp;channels. But images in dataset is in gray-scale and have only one channel. How you convert from 1 to 3 channels? Is it just a copy?</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63208",
      "postDate": "01/26/2015 20:40:41",
      "content": "<p>Oh, thank you!</p>\n<p>[quote=Bing Xu;63204]</p>\n<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[quote=Oleksandr Baiev;63180]</p>\n<p>Hi Bing,</p>\n<p>Thank you for sharing the guide.</p>\n<p><br>In the config file you set image shape to (3,48,48). As I can understand &quot;3&quot; is a number of input&nbsp;channels. But images in dataset is in gray-scale and have only one channel. How you convert from 1 to 3 channels? Is it just a copy?</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63220",
      "postDate": "01/26/2015 23:53:40",
      "content": "<p>[quote=Bing Xu;63204]</p>\n<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[/quote]</p>\n<p>I believe libjpeg, which is required for openCV, will decode greyscale images into a single channel. I'm not sure if any additional overhead is introduced by processing three identical channels in the convnet.</p>\n<p>Caffe appears to determine image size by reading the jpeg metadata and it understands greyscale. However I have found cxxnet to be substantially faster than caffe on this problem.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63272",
      "postDate": "01/28/2015 12:53:48",
      "content": "<p>[quote=Ertuka;62083]</p>\n<p>Thanks Bing for this eye opening example by running it&nbsp; with GPU Cuda cores.</p>\n<p>As much as I can follow you use one of Linux flavor to utilize GPU and maybe some other people has success on MacOS. I can run your examples on CPU on Ubuntu VM with vmplayer on a Win8.1 host however I wonder whether I can utilize host Nvidia GPU tied to host Win8.1. Is there Anybody managed to run this on Win8.1 OS with GPU? There is a MinGW solution: http://pavel.surmenok.com/2014/05/31/installing-theano-with-gpu-on-windows-64-bit/</p>\n<p>but not yet tried maybe somebody can point a better, like cygwin possibility?</p>\n<p>Thanks</p>\n<p>[/quote]</p>\n<p>Ertuka, Could you let me know the changes you made to the build, I am running on ubuntu using VMware and I am stuck with the build issues.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63287",
      "postDate": "01/29/2015 01:22:34",
      "content": "<p>I used make file under directory make under top dir:</p>\n<p>cd make; make -f Cblas.cpu.mk </p>\n<p>You need add some stuff in it, not remember exactly what but here is the lines from my version</p>\n<p>that you can see what is missing:</p>\n<p>export LDFLAGS= -lcblas -lm -lz -lpthread `pkg-config --libs opencv`</p>\n<p>CFLAGS += -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</p>\n<p>It creates the bin in the same directory.</p>\n<p>I assume you install Cuda developemnt kit by ignoring nvidia driver otherwise next time login your VM will be in a bad state. CPU takes close to 6hours to run all 45 iterations on i7-4710HQ and not uses more than 4GB memory and a single CPU.</p>\n<p>Maybe there is way to make multthreading but I havent looked at it much.</p>\n<p>In terms of running on windows, my attempt for cxxnet was a failure since it uses heavily GNU specific stuff and combined with my weak Visual studio community experience so I couldn't manage to combine nvcc on Visual studio with gnu c++ on mingw nor VC++. On windows my only success was to be able run theano on python and GTX 860M runs a simple large matrix multiplication 24 times faster than on CPU. So I am looking to dual boot my laptop to use GPU on a linux flavor after many years of satisfied user of linux on VMs.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63339",
      "postDate": "01/30/2015 02:49:24",
      "content": "<p>Quick question, Bing; is there an easy way to specify to hold out and report error rates on a validation set during training in the conf file? &nbsp;</p>\n\n<p>Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63357",
      "postDate": "01/30/2015 13:31:21",
      "content": "<p>[quote=kartal;61442]</p>\n<p>Hi Bing,</p>\n<p>When I run the gen_train.py function I am getting these warnings &quot;convert is not recognized as an internal or external command&quot;. Are you using a special python package to resize images?</p>\n<p>[/quote]</p>\n<p>Install Imagemagick</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63366",
      "postDate": "01/30/2015 14:56:59",
      "content": "<p>Hi</p>\n<p>I got CXXNET installed and it runs on the cpu. But on the gpu (Iuse dev = gpu) after initializing I get:</p>\n<p>initializing end, start working<br>update round 0</p>\n<p>and it stops and jumps back to the shell promt. No error code, nothing. And no training.</p>\n<p>I'm using Ubuntu 14.04 and the NVIDIA Geforce GTX 750 Ti.&nbsp;</p>\n<p>CUDA seems to work and I even get:</p>\n<p>Use CUDA Device 0: GeForce GTX 750 Ti<br>CXXNetTrainer, devCPU=0</p>\n<p>after starting cxxnet.&nbsp;</p>\n<p>Any idea what's the problem?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63368",
      "postDate": "01/30/2015 17:04:09",
      "content": "<p>I'm working off a ubuntu 14.04 amazon AWS gpu instance (grid K520), and one of the things I had done prior to trying to work with cxxnet was go through&nbsp;http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/.</p>\n<p>I hadn't tried to use cxxnet before doing the installation, though.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63370",
      "postDate": "01/30/2015 18:30:59",
      "content": "<p>[quote=Wolf Gang;63366]</p>\n<p>Hi</p>\n<p>I got CXXNET installed and it runs on the cpu. But on the gpu (Iuse dev = gpu) after initializing I get:</p>\n<p>initializing end, start working<br>update round 0</p>\n<p>and it stops and jumps back to the shell promt. No error code, nothing. And no training.</p>\n<p>I'm using Ubuntu 14.04 and the NVIDIA Geforce GTX 750 Ti.&nbsp;</p>\n<p>CUDA seems to work and I even get:</p>\n<p>Use CUDA Device 0: GeForce GTX 750 Ti<br>CXXNetTrainer, devCPU=0</p>\n<p>after starting cxxnet.&nbsp;</p>\n<p>Any idea what's the problem?</p>\n<p>[/quote]</p>\n<p>Check this post by lametta. Doing that fixed the same issue for me&nbsp;https://www.kaggle.com/c/datasciencebowl/forums/t/11279/public-start-guide-of-deep-network-with-a-score-of-1-382285/62236#post62236</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63426",
      "postDate": "02/02/2015 03:43:40",
      "content": "<p>[quote=Ertuka;63287]</p>\n<p>I used make file under directory make under top dir:</p>\n<p>cd make; make -f Cblas.cpu.mk</p>\n<p>You need add some stuff in it, not remember exactly what but here is the lines from my version</p>\n<p>that you can see what is missing:</p>\n<p>export LDFLAGS= -lcblas -lm -lz -lpthread `pkg-config --libs opencv`</p>\n<p>CFLAGS += -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</p>\n<p>It creates the bin in the same directory.</p>\n<p>I assume you install Cuda developemnt kit by ignoring nvidia driver otherwise next time login your VM will be in a bad state. CPU takes close to 6hours to run all 45 iterations on i7-4710HQ and not uses more than 4GB memory and a single CPU.</p>\n<p>Maybe there is way to make multthreading but I havent looked at it much.</p>\n<p>In terms of running on windows, my attempt for cxxnet was a failure since it uses heavily GNU specific stuff and combined with my weak Visual studio community experience so I couldn't manage to combine nvcc on Visual studio with gnu c++ on mingw nor VC++. On windows my only success was to be able run theano on python and GTX 860M runs a simple large matrix multiplication 24 times faster than on CPU. So I am looking to dual boot my laptop to use GPU on a linux flavor after many years of satisfied user of linux on VMs.</p>\n<p>[/quote]</p>\n<p>Thank you very much, it helped!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63438",
      "postDate": "02/02/2015 15:19:43",
      "content": "<p>[quote=Bing Xu;63204]</p>\n<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[/quote]</p>\n<p>Has anybody had any luck getting this to run with 1 channel? &nbsp;I've tried to reduce my channels to 1, and my image manipulation apps all say the image is greyscale, but no matter what CXXNet isn't working for me unless I set the channel dimension to 3.</p>\n<p>I have this feeling like my image apps are lying to me, and that my JPGs really are still 3 channels. Not sure what to use to legitimately make a one channel image though.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63440",
      "postDate": "02/02/2015 15:46:07",
      "content": "<p>They are 1 channel, per Bing's note cxxnet converts them to 3 channel no matter what.</p>\n<p>Getting cxxnet to handle single channel input without replicating the data three times would be a good enhancement.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63491",
      "postDate": "02/03/2015 18:20:35",
      "content": "<p>I haven't been following this thread, but thought it might be a good way to learn something about cxxnet to see how it compares with similar tools.</p>\n<p>Didn't have much trouble building it (on Linux Mint 17), although I did have to monkey with the make file and the source code slightly (nothing that hasn't been covered in this forum already).&nbsp; Once it was built I managed to run the MNIST example/tutorial successfully (with and without GPU acceleration).&nbsp; Very nice!&nbsp; Compares very favorably to other CNN implementations as far as speed is concerned!</p>\n<p>First I have a simple question: The MNIST config file has &quot;pad = 1&quot; for the first conv layer, but the cxxnet &quot;Layers&quot; documentation doesn't mention a &quot;pad&quot; option.&nbsp; What is it for?</p>\n<p>And a comment/suggestion:&nbsp; It would be nice to have the ability to specify a hold-out or validation set in the config file (that either isn't part of the training data, or is a random N% of the training data) against which the model is tested after each training epoch, using the selected metric, rather than (or in addition to) evaluation vs. the training data.&nbsp; Would help with cross-validation and finding &quot;early stopping&quot; criteria.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63492",
      "postDate": "02/03/2015 19:04:55",
      "content": "<p>Never mind my padding question above.&nbsp; I looked at the code and it appears to mean exactly the same thing as it does in Caffe.&nbsp; That was my assumption, but lacking documentation I wasn't sure.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63619",
      "postDate": "02/04/2015 22:33:46",
      "content": "<p>If we're adding feature requests, I would note that it seems strange to have both a training config file and prediction config file,given the substantial overlap in parameters between the two.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63632",
      "postDate": "02/05/2015 07:46:13",
      "content": "",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63669",
      "postDate": "02/06/2015 00:49:09",
      "content": "<p>You can decode with `CV_LOAD_IMAGE_GRAYSCALE` or `CV_LOAD_IMAGE_UNCHANGED` parameter, that will give you a single channel image :)</p>\n<p>[quote=Bing Xu;63204]</p>\n<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[quote=Oleksandr Baiev;63180]</p>\n<p>Hi Bing,</p>\n<p>Thank you for sharing the guide.</p>\n<p><br>In the config file you set image shape to (3,48,48). As I can understand &quot;3&quot; is a number of input&nbsp;channels. But images in dataset is in gray-scale and have only one channel. How you convert from 1 to 3 channels? Is it just a copy?</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63758",
      "postDate": "02/07/2015 22:16:35",
      "content": "<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63760",
      "postDate": "02/07/2015 22:58:24",
      "content": "<p>[quote=superfan123;63758]</p>\n<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>\n<p>[/quote]</p>\n<p>The root cause is that CUDA 6.5 doesn't support gcc 4.9 or up. gcc 4.8 should be good.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63761",
      "postDate": "02/07/2015 23:13:11",
      "content": "<p>Just modify CUDA config.h file to accept 4.9 since CUDA 6.5 contraints gcc to 4.8 and lower.</p>\n<p>I have used gcc 4.9 on F21 with CUDA 6.5 and not seen any issue so far.</p>\n<p>[quote=superfan123;63758]</p>\n<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63762",
      "postDate": "02/07/2015 23:15:14",
      "content": "<p>[quote=Guocong Song;63760]</p>\n<p>[quote=superfan123;63758]</p>\n<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>\n<p>[/quote]</p>\n<p>The root cause is that CUDA 6.5 doesn't support gcc 4.9 or up. gcc 4.8 should be good.</p>\n<p>[/quote]</p>\n<p>Your are right. I changed gcc link file in ~/CUDA-6.5/bin and make it point to gcc++-4.8 but that didn't fix the problem,&nbsp;</p>\n<p>Anything else I should change?</p>\n<p>I have gcc4.9 and 4.8 installed on Ubuntu 14.04.</p>\n<p>Thanks a lot.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63764",
      "postDate": "02/07/2015 23:26:59",
      "content": "<p>[quote=Ertuka;63761]</p>\n<p>Just modify CUDA config.h file to accept 4.9 since CUDA 6.5 contraints gcc to 4.8 and lower.</p>\n<p>I have used gcc 4.9 on F21 with CUDA 6.5 and not seen any issue so far.</p>\n<p>[quote=superfan123;63758]</p>\n<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>Thanks Ertuka, Could you show me a sample statement&nbsp;to modify config.h?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63765",
      "postDate": "02/07/2015 23:34:03",
      "content": "<p>Thanks guys, Now it's working :)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63766",
      "postDate": "02/08/2015 00:31:23",
      "content": "<p>Now after add those header and lib --</p>\n<p>-I/usr/local/cuda-6.5/include</p>\n<p>-I/opt/intel/mkl/include</p>\n<p>-I/opt/intel/composer_xe_2015.2.164/mkl/include</p>\n<p>-L/opt/intel/mkl/lib/intel64</p>\n<p>-L/opt/intel/composer_xe_2015.2.164/compiler/lib/intel64</p>\n<p>-L/usr/local/cuda-6.5/lib64</p>\n\n<p>I got lots of errors like --</p>\n<p>/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `mkl_spblas_ccoo0nhuuc__mmout_par'</p>\n<p>/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `mkl_lapack_ps_dsymv_nb'<br>/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_chesvxx'<br>/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_ssygst'</p>\n\n<p>I guess some header file is missing...</p>\n<p>Appreciate your help!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63767",
      "postDate": "02/08/2015 00:41:08",
      "content": "<p>Looks like you don't have mkl, so build it as</p>\n<p>build.sh blas=1</p>\n<p>and install blas libs possibly atlas-devel.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63768",
      "postDate": "02/08/2015 00:52:59",
      "content": "<p>I installed intel MKL composer package and I also include MKL header and lib. Maybe something else still missing.</p>\n<p>Thanks</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63770",
      "postDate": "02/08/2015 04:46:04",
      "content": "<p>It was going well. I built cxxnet with a small change to the Makefile. I tested on CPU with MNIST and it worked. It took some trial and error to get the original data location correct: I put in in cxxnet/example/kaggle_bowl/bowl/data and the new images (48x48) are in cxxnet/example/kaggle_bowl/data. (the difference is the extra bowl dir).</p>\n<p>The problem is in generating the image lists:</p>\n<p>&nbsp; &nbsp;python gen_img_list.py train cxxnet/example/kaggle_bowl/bowl/sampleSubmission.csv data/train train.lst&nbsp;</p>\n<p>&nbsp;it immediately gives the error no such file. When I touch a file of that name there to create an empty file, it stops due to nothing in the file.</p>\n<p>&nbsp; Did I get the data locations correct?&nbsp;</p>\n<p>&nbsp; How do you create sampleSubmission.csv? Am I putting it in the correct place?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63774",
      "postDate": "02/08/2015 11:45:15",
      "content": "<p>Does this tutorial giving score =1.3 for everybody, It is not working for me, I had score 4.7 by this tutorial. I am doing something wrong?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63775",
      "postDate": "02/08/2015 13:21:55",
      "content": "<p>@Bing Xu,Thank you for this great tutorial!</p>\n<p>I got 1.42 on LB after a sleepless night. Totally worth it.</p>\n<p>I have a GTX610 with 48 cuda core and it takes 2 hour for modeling step. Plan to upgrade to a GPU and try it again. I need to sell one kidney to buy a K80. ;)</p>\n<p>Still need to figure out MKL part. :-\\</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63789",
      "postDate": "02/09/2015 01:40:28",
      "content": "<p>[quote=Charles Roberson;63770]</p>\n<p>It was going well. I built cxxnet with a small change to the Makefile. I tested on CPU with MNIST and it worked. It took some trial and error to get the original data location correct: I put in in cxxnet/example/kaggle_bowl/bowl/data and the new images (48x48) are in cxxnet/example/kaggle_bowl/data. (the difference is the extra bowl dir).</p>\n<p>The problem is in generating the image lists:</p>\n<p>&nbsp; &nbsp;python gen_img_list.py train cxxnet/example/kaggle_bowl/bowl/sampleSubmission.csv data/train train.lst&nbsp;</p>\n<p>&nbsp;it immediately gives the error no such file. When I touch a file of that name there to create an empty file, it stops due to nothing in the file.</p>\n<p>&nbsp; Did I get the data locations correct?&nbsp;</p>\n<p>&nbsp; How do you create sampleSubmission.csv? Am I putting it in the correct place?</p>\n<p>[/quote]</p>\n<p>sampleSubmission.csv is made available by Kaggle on the data page. You point the command at wherever you store that.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63905",
      "postDate": "02/10/2015 09:49:59",
      "content": "<p>Thanks Bing for the excellent script, I am trying to learn a bit about the CNNs that way.</p>\n<p>I could get cxxnet running on cpu and without mkl and got through the example with the&nbsp;48x48 resized pictures and got a score around 1.39 (after 10 hrs..). Then I tried instead of resizing with imagemagick (as in the example) to use a python script to generate 48x48 sized train files via cropping and finally stored the files using cv2.imwrite.</p>\n<p>I have the same number of train images with the same 48x48 size as in the example, but generated in a different way. Now, the cxxnet file doesnt seem to learn anymore, here is a sample output what I get from cxxnet:</p>\n<p>...</p>\n<p>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>loading mean image from models/image_mean.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>round 0:[ 100] 467 sec elapsed[1] train-error:0.936077<br>round 1:[ 100] 1241 sec elapsed[2] train-error:0.936077<br>round 2:[ 100] 2014 sec elapsed[3] train-error:0.934785<br>round 3:[ 100] 2783 sec elapsed[4] train-error:0.936077<br>round 4:[ 100] 3566 sec elapsed[5] train-error:0.936077<br>round 5:[ 100] 4377 sec elapsed[6] train-error:0.934785<br>round 6:[ 100] 5122 sec elapsed[7] train-error:0.936077<br>...</p>\n<p>Its similar to the problem description I found here:</p>\n<p>https://github.com/antinucleon/cxxnet/issues/28</p>\n<p>Is there something wrong in the way I generate the jpgs? Or should I adjust<br>&nbsp;some parameters in bowl.conf to achieve convergence? Right now I didnt touch bowl.conf,<br>&nbsp;its exactly as in the example.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63973",
      "postDate": "02/10/2015 21:39:19",
      "content": "<p>@nils:</p>\n<p>Did you regenerate the mean image file using the new set of training images that you created?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63978",
      "postDate": "02/10/2015 23:10:30",
      "content": "<p>@Torgos, Thanks for the info. Of course that fixed it. I had more issues but fixed them myself and got it all working.</p>\n<p>@Bing, Thanks for the work and sharing.</p>\n<p>This next suggestion can help EVERYBODY.</p>\n<p>@All in CNN, The submission files are 4x to 7x bigger than the ones I used for my RF model submissions. Looking at the submission file, I see why. There are many entries with values below 0.0001 which look like 6.nnnnne-07.</p>\n<p>&nbsp; If all numbers less than 0.0001 (1% of 1%) were set to 0, that would significantly cut the data size: likely by 5x or better. This will translate into much smaller zip files as well. My current CNN submission zip files are 70 MB while my RF submission zip files are around 10MB to 15MB.</p>\n<p>&nbsp; &nbsp;I'd do this myself, but I don't know Python and it looks like line 29 in the make_submission.py file needs changing.</p>\n<p>&nbsp; I think doing this will help everybody and kaggle.com due to a reduction in bandwidth. Things are just going to heat up more in the next 34 days! Also, there are some other contests ending near the same day as this one.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64133",
      "postDate": "02/12/2015 18:15:57",
      "content": "<p>Hi all,</p>\n<p>I'm new to this forum (and not a data science expert either). First of all, I want to thank Bing Xu &amp; Tianqi Chen for this nice cxxnet thing. It took me several unsuccessful days to compile opencv on my old 2009 Macbook (with Mavericks) until I realized I could use homebrew; the cxxnet path has been (quite) smooth since then; I am now where many of you were 40-50 days ago: score of 1.39, thinking on input augmentation...</p>\n<p>My problem is that my GPU has not enough memory (just 256MB) to run cxxnet with the given bowl.conf, and it took 10 hours to run 45 rounds in CPU mode.</p>\n<p>Is there something I can try to run cxxnet in my GPU? I have reduced the resize parameters from 48*48 to 30*30, but still no luck. (BTW, I know GPU+CUDA works properly because the MNIST tutorial runs on it)</p>\n<p>Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64134",
      "postDate": "02/12/2015 18:21:48",
      "content": "<p>Try reducing the batch size. Either way I recommend getting ec2 g2large instance. Spot requests are $0.10 per hour.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64135",
      "postDate": "02/12/2015 18:31:11",
      "content": "<p>Thanks for your fast answer. I took a look to aws and google cloud but I did not understand how to proceed for this specific need: do you upload the code as-is to a virtual machine? or do you have to adapt the code to a virtual array of GPUs?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64136",
      "postDate": "02/12/2015 18:37:45",
      "content": "<p>You gain access to your own instance. You can log and do everything with it through ssh.</p>\n<p><span style=\"line-height: 1.4\">What I did was</span></p>\n<p>1. Create instance (ubuntu)</p>\n<p>2. Attach ebs storage to it for persistant data</p>\n<p>3. install everything : libraries, cuda. Save the image (ami) of the instance (it can be terminated any time so you need to make sure you can start it up again fast).</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64156",
      "postDate": "02/13/2015 05:39:22",
      "content": "<p>You can follow this blog or use the AMI they mentioned</p>\n<p>http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/</p>\n<p>Use spot instances. GPU spot instance cost is around 0.064</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64195",
      "postDate": "02/13/2015 21:59:15",
      "content": "<p>[quote=zeros_benchmark;63973]</p>\n<p>@nils:</p>\n<p>Did you regenerate the mean image file using the new set of training images that you created?</p>\n<p>[/quote]</p>\n<p>I deleted all the files in the models folder so I assume the mean image was newly generated. I now also got cxxnet working on my image set-I simply did a clean compilation and generated all the cropped images again. I still dont know what went wrong before but it works now, thanks!</p>\n<p>Another thing, is it possible to view the filter banks within cxxnet? Is there some simple way to extract and visualize them from the models files? </p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65089",
      "postDate": "02/28/2015 01:58:09",
      "content": "<p>When I try to use the code in cv,&nbsp;the prediction file&nbsp;sometimes lost some samples.&nbsp;</p>\n<p>Say the test.lst have 10200 samples, which is correct, but test.txt only contains 10000 samples. How to deal with it?</p>\n<p>Sorry I didn't go through every page of this post. maybe my question is answered somewhere.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65090",
      "postDate": "02/28/2015 02:05:15",
      "content": "<p>Change the batch size; cxxnet only predicts multiples of it.</p>\n\n<p>https://github.com/antinucleon/cxxnet/issues/17</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65091",
      "postDate": "02/28/2015 02:11:30",
      "content": "<p>[quote=Torgos;65090]</p>\n<p>Change the batch size; cxxnet only predicts multiples of it.</p>\n<p>https://github.com/antinucleon/cxxnet/issues/17</p>\n<p>[/quote]</p>\n<p>I see. Thank you very much!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65092",
      "postDate": "02/28/2015 02:16:13",
      "content": "<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n\n<p>[quote=rcarson;65089]</p>\n<p>When I try to use the code in cv,&nbsp;the prediction file&nbsp;sometimes lost some samples.&nbsp;</p>\n<p>Say the test.lst have 10200 samples, which is correct, but test.txt only contains 10000 samples. How to deal with it?</p>\n<p>Sorry I didn't go through every page of this post. maybe my question is answered somewhere.</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65098",
      "postDate": "02/28/2015 03:00:19",
      "content": "<p>[quote=Bing Xu;65092]</p>\n<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n<p>[/quote]</p>\n\n<p>That's awesome! I'm on the edge of my seat :)</p>\n<p>What sort of real time augmentation are you going to include?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65112",
      "postDate": "02/28/2015 06:17:12",
      "content": "<p>[quote=Bing Xu;65092]</p>\n<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n<p>[quote=rcarson;65089]</p>\n<p>When I try to use the code in cv,&nbsp;the prediction file&nbsp;sometimes lost some samples.&nbsp;</p>\n<p>Say the test.lst have 10200 samples, which is correct, but test.txt only contains 10000 samples. How to deal with it?</p>\n<p>Sorry I didn't go through every page of this post. maybe my question is answered somewhere.</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>That's terrific Bing. You got all the missing pieces covered with those updates.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65211",
      "postDate": "03/02/2015 02:55:28",
      "content": "",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65212",
      "postDate": "03/02/2015 02:56:37",
      "content": "<p>[quote=Robert Griesmeyer;62324]</p>\n<p>Did anyone get it running on the Macbook on OSX? &nbsp;</p>\n<p>[/quote]</p>\n<p>Yes, use Blas and the following attached files for generating cxxnet and your images. Otherwise, you will get a mismatch in the shape of tensors. Total running time for training on a MacAir (CPU only) was ~5 hours with prediction time of about 15 minutes.</p>\n<p>Regards,</p>\n<p>Mark</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65401",
      "postDate": "03/04/2015 11:47:27",
      "content": "<p>get the following error when running ./build.sh.<br>cxxnet/io/cxxnet_data.cpp:6:28: error: mshadow/tensor.h: No such file or directory<br>In file included from cxxnet/io/cxxnet_data.cpp:18:<br>cxxnet/io/cxxnet_iter_cifar-inl.hpp:5:38: error: mshadow/tensor_container.h: No such file or directory<br>In file included from cxxnet/io/cxxnet_data.cpp:21:<br>cxxnet/io/cxxnet_iter_img-inl.hpp:14:30: error: opencv2/opencv.hpp: No such file or directory</p>\n<p><br>&nbsp;</p>\n<p>This means that the header files are not being included correctly. I have modified the Makefile with -I option to include all the headers. Does anybody have any idea why this is happening?</p>\n<p>I have already cloned mshadow and can see the header files in the directory but they are not being included for some reason.</p>\n<p>Please find attached my Makefile and error log.Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65402",
      "postDate": "03/04/2015 11:50:43",
      "content": "<p>^ Oops, The last Makefile(1.57 KB) is the correct one. Ignore the first one.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65559",
      "postDate": "03/06/2015 02:17:26",
      "content": "<p>Hi Bing, thanx a lot for sharing! In the sample config file (bowl.conf), some conv layers don't have a stride value. So I'm wondering what the default stride is.&nbsp;</p>\n<p>Please advise. Many thanx in advance!</p>\n\n<p>JJ</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65627",
      "postDate": "03/06/2015 19:53:08",
      "content": "<p>[quote=Bing Xu;65092]</p>\n<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n<p>[/quote]</p>\n<p>Looking forward to it for the diabetes competition; I don't suppose you're including a quick option in the config file to split (and report on) a % of data off for validation?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65631",
      "postDate": "03/06/2015 20:01:30",
      "content": "<p>There is many ways to do it and we don't think it is an important feature to hard code.</p>\n<p>Solution in V2:</p>\n<p>1. sed -n '1, 20000p' train.lst &gt; tr.lst</p>\n<p>&nbsp; &nbsp; sed -n '20000, 30337p' train.lst &gt; va.lst</p>\n<p>Then generate bin according to it.</p>\n<p>2. Use script in tools to split list file in to parts, like 6 separate bin files. Then set in configuration file which bins you want to use to train and which bins you want to treat as eval</p>\n\n<p>3. Use python interface, do slice by numpy&nbsp;</p>\n<p>[quote=Torgos;65627]</p>\n<p>[quote=Bing Xu;65092]</p>\n<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n<p>[/quote]</p>\n<p>Looking forward to it for the diabetes competition; I don't suppose you're including a quick option in the config file to split (and report on) a % of data off for validation?</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65677",
      "postDate": "03/07/2015 11:54:39",
      "content": "<p>I was able to get all the header files included but running ./build.sh is throwing errors like:</p>\n<p>cxxnet/io/cxxnet_data.cpp:12: error: &#8216;real_t&#8217; in namespace &#8216;mshadow&#8217; does not name a type</p>\n<p>cxxnet/io/cxxnet_iter_cifar-inl.hpp:14: error: &#8216;struct mshadow::Tensor&lt;mshadow::cpu, 4, float&gt;&#8217; has no member named &#8216;dptr&#8217;</p>\n<p>cxxnet/io/cxxnet_iter_cifar-inl.hpp:42: error: &#8216;struct mshadow::Tensor&lt;mshadow::cpu, 4, float&gt;&#8217; has no member named &#8216;shape&#8217;</p>\n<p>Please find my Makefile attached. I have added all of the header file directories for OpenCV with the -I flag to CFLAGS because I had installed OpenCV in a custom location (no root access :/ ).</p>\n<p><br>The full error log is present in whatever.log</p>\n<p>@Bing, can you take a quick look at this? Btw, thanks for writing CXXNET :)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65684",
      "postDate": "03/07/2015 15:45:38",
      "content": "<p>[quote=Saurav Gupta;65677]</p>\n<p>I was able to get all the header files included but running ./build.sh is throwing errors like:</p>\n<p>cxxnet/io/cxxnet_data.cpp:12: error: &#8216;real_t&#8217; in namespace &#8216;mshadow&#8217; does not name a type</p>\n<p>cxxnet/io/cxxnet_iter_cifar-inl.hpp:14: error: &#8216;struct mshadow::Tensor&lt;mshadow::cpu, 4, float&gt;&#8217; has no member named &#8216;dptr&#8217;</p>\n<p>cxxnet/io/cxxnet_iter_cifar-inl.hpp:42: error: &#8216;struct mshadow::Tensor&lt;mshadow::cpu, 4, float&gt;&#8217; has no member named &#8216;shape&#8217;</p>\n<p>Please find my Makefile attached. I have added all of the header file directories for OpenCV with the -I flag to CFLAGS because I had installed OpenCV in a custom location (no root access :/ ).</p>\n<p><br>The full error log is present in whatever.log</p>\n<p>@Bing, can you take a quick look at this? Btw, thanks for writing CXXNET :)</p>\n<p>[/quote]</p>\n<p>You may be using the newer version of the mshadow code (2.x). You have to point to the older version (1.x).</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65771",
      "postDate": "03/09/2015 11:39:08",
      "content": "<p>deleted</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 60429,
      "author_name": "blackeagle",
      "author_url": "",
      "post_date": "12/17/2014 05:03:41",
      "content": "<p>Can I use CXXNET on a windows machine?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60431,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/17/2014 05:06:18",
      "content": "<p>I don't have Windows machine with GPU so I am not very sure.. I guess you can but you need to configure by yourself.</p>\n<p>[quote=kartal;60429]</p>\n<p>Can I use CXXNET on a windows machine?</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60439,
      "author_name": "issac4sacrifice",
      "author_url": "",
      "post_date": "12/17/2014 07:20:29",
      "content": "<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60440,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/17/2014 07:31:27",
      "content": "<p>You can, you need blas or MKL installed. Then set dev=cpu in config file</p>\n\n<p>[quote=Issac;60439]</p>\n<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60441,
      "author_name": "phunter",
      "author_url": "",
      "post_date": "12/17/2014 07:46:28",
      "content": "<p>Very nice, star-ed it on github!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60464,
      "author_name": "jiweiliu",
      "author_url": "",
      "post_date": "12/17/2014 11:13:08",
      "content": "<p>Thank you very much! How much main memory and GPU memory does it require?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60483,
      "author_name": "",
      "author_url": "",
      "post_date": "12/17/2014 14:12:56",
      "content": "<p>What's the difference between cxxnet and <a href=\"http://caffe.berkeleyvision.org/\">Caffe</a>?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60499,
      "author_name": "adjgiulio",
      "author_url": "",
      "post_date": "12/17/2014 16:30:48",
      "content": "<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>Bing, thanks! This is great work, as usual :-)</p>\n<p>I hate to tell you this, but in the beginning I'm afraid you'll end up getting more questions about how to install this (and errors while installing) than how to use it. I think adding more details in the wiki about the install, dependencies, where to get the dependencies, how to make sure those work, how to troubleshoot errors,.. might save you time in the long run.</p>\n<p>But again, awesome work! Thanks a lot!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60503,
      "author_name": "abhishek",
      "author_url": "",
      "post_date": "12/17/2014 16:43:42",
      "content": "<p>Ahh... I wish I had GPU :-/</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61418,
      "author_name": "johnnystrings",
      "author_url": "",
      "post_date": "12/17/2014 20:02:17",
      "content": "<p>Thanks Bing - this is as good and straight-forward of an intro to deep learning using a GPU as anyone could hope for. &nbsp;I understand you had a GTX 780M or something like that for processing. &nbsp;May I also ask how much RAM your system had, and how much was in use while processing, if you happen to know? &nbsp;Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61419,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/17/2014 20:09:22",
      "content": "<p>300MB GPU mem, 1GB CPU mem is enough.&nbsp;I remember</p>\n<p>[quote=Johnny Strings;61418]</p>\n<p>Thanks Bing - this is as good and straight-forward of an intro to deep learning using a GPU as anyone could hope for. &nbsp;I understand you had a GTX 780M or something like that for processing. &nbsp;May I also ask how much RAM your system had, and how much was in use while processing, if you happen to know? &nbsp;Thanks!</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61420,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/17/2014 20:09:52",
      "content": "<p>You can use CPU. MKL will give you reasonable performance</p>\n<p>[quote=Abhishek;60503]</p>\n<p>Ahh... I wish I had GPU :-/</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61421,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/17/2014 20:10:50",
      "content": "<p>Thanks for this advice, I will put link of wiki to README</p>\n<p>[quote=Giulio;60499]</p>\n<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>Bing, thanks! This is great work, as usual :-)</p>\n<p>I hate to tell you this, but in the beginning I'm afraid you'll end up getting more questions about how to install this (and errors while installing) than how to use it. I think adding more details in the wiki about the install, dependencies, where to get the dependencies, how to make sure those work, how to troubleshoot errors,.. might save you time in the long run.</p>\n<p>But again, awesome work! Thanks a lot!</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61423,
      "author_name": "dylanjf",
      "author_url": "",
      "post_date": "12/17/2014 20:56:13",
      "content": "<p>thanks for sharing. &nbsp;i'm attempting to get this setup with caffe, so this will be a good guide. &nbsp;i'll share my version too if i get it working :)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61426,
      "author_name": "tqchen",
      "author_url": "",
      "post_date": "12/17/2014 21:21:27",
      "content": "<p>I am one of the author. In short, they are similar. CXXNET is much shorter, and concise in terms of lines of code.</p>\n\n<p>[quote=ziyuang;60483]</p>\n<p>What's the difference between cxxnet and <a href=\"http://caffe.berkeleyvision.org/\">Caffe</a>?</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61427,
      "author_name": "mikeskim",
      "author_url": "",
      "post_date": "12/17/2014 21:22:31",
      "content": "<p>[quote=Abhishek;60503]</p>\n<p>Ahh... I wish I had GPU :-/</p>\n<p>[/quote]</p>\n<p>Have you considered using AWS GPU instances?&nbsp;http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html<br>If you're okay with spot pricing and sudden cutoffs, I'm sure you can get a good rate.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61428,
      "author_name": "",
      "author_url": "",
      "post_date": "12/17/2014 21:26:12",
      "content": "<p>[quote=Tianqi Chen;61426]</p>\n<p>I am one of the author. In short, they are similar. CXXNET is much shorter, and concise in terms of lines of code.</p>\n<p>[quote=ziyuang;60483]</p>\n<p>What's the difference between cxxnet and <a href=\"http://caffe.berkeleyvision.org/\">Caffe</a>?</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>How about from the user's angle? Does it mean CXXNET will be faster, or does it mean it will be easier to learn because of the conciseness?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61432,
      "author_name": "clustifier",
      "author_url": "",
      "post_date": "12/17/2014 22:09:44",
      "content": "<p>Can CXXNET&nbsp;be run on Macbook pro with GPU?</p>\n<p>I'm getting this:</p>\n<p><code>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:76:12: fatal error: 'mkl.h' file not found<br> #include &lt;mkl.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61433,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/17/2014 22:28:09",
      "content": "<p>In default it is using MKL. I don't have Macbook so I am not sure. Ideally it is able to run on all NVIDIA GPU.</p>\n<p>Please refer<a href=\"https://github.com/antinucleon/cxxnet#build-guide\">&nbsp;https://github.com/antinucleon/cxxnet#build-guide</a>&nbsp;to build it.</p>\n<p>[quote=clustifier;61432]</p>\n<p>Can CXXNET&nbsp;be run on Macbook pro with GPU?</p>\n<p>I'm getting this:</p>\n<p><code>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:76:12: fatal error: 'mkl.h' file not found<br> #include &lt;mkl.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</code></p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61436,
      "author_name": "jason50",
      "author_url": "",
      "post_date": "12/17/2014 23:36:42",
      "content": "<p>Thanks for sharing the code. &nbsp;I have a&nbsp;problems when installing cxxnet&nbsp;on Ubuntu 14.04</p>\n<p>$ build.sh blas=1</p>\n<p><code></code><code><code>g++ -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o bin/cxxnet cxxnet/cxxnet_main.cpp cxxnet_data.o cxxnet_nnet_cpu.o cxxnet_nnet_gpu.o -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>/usr/bin/ld: cxxnet_data.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'<br>//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line<br>collect2: error: ld returned 1 exit status<br>make: *** [bin/cxxnet] Error 1<br></code></code></p>\n<p>How could I fix it?</p>\n\n<p>Meanwhile, do you mean add 'dev=cpu' to&nbsp;bowl.conf ?&nbsp; I didn't find&nbsp; 'dev=cpu' or&nbsp; 'dev=gpu' in any fil</p>\n<p>e. &nbsp;I guess that you are using GPU and it is the default option.</p>\n\n<p>Many Thanks</p>\n\n<p>[</p>\n<p>quote=Bing Xu;60440]</p>\n<p>You can, you need blas or MKL installed. Then set dev=cpu in config file</p>\n<p>[quote=Issac;60439]</p>\n<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61437,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/17/2014 23:40:12",
      "content": "<p>I suggest you post in issue on <a href=\"https://github.com/antinucleon/cxxnet/issues\">Github</a>&nbsp;about building problem. It is about your pthread problem on your machine. I guess may be upgrade your gcc will help. But I am not sure because I never use Mac.</p>\n\n\n<p>You can add ```dev = cpu``` at global setting part, I mean no indent</p>\n\n<p>[quote=Jason;61436]</p>\n<p>Thanks for sharing the code. &nbsp;I have a&nbsp;problems when installing cxxnet&nbsp;on Ubuntu 14.04</p>\n<p>$ build.sh blas=1</p>\n<p><code></code><code><code>g++ -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o bin/cxxnet cxxnet/cxxnet_main.cpp cxxnet_data.o cxxnet_nnet_cpu.o cxxnet_nnet_gpu.o -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>/usr/bin/ld: cxxnet_data.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'<br>//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line<br>collect2: error: ld returned 1 exit status<br>make: *** [bin/cxxnet] Error 1<br></code></code></p>\n<p>How could I fix it?</p>\n<p>Meanwhile, do you mean add 'dev=cpu' to&nbsp;bowl.conf ?&nbsp; I didn't find&nbsp; 'dev=cpu' or&nbsp; 'dev=gpu' in any fil</p>\n<p>e. &nbsp;I guess that you are using GPU and it is the default option.</p>\n<p>Many Thanks</p>\n<p>[</p>\n<p>quote=Bing Xu;60440]</p>\n<p>You can, you need blas or MKL installed. Then set dev=cpu in config file</p>\n<p>[quote=Issac;60439]</p>\n<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61438,
      "author_name": "jason50",
      "author_url": "",
      "post_date": "12/18/2014 00:25:02",
      "content": "<p>Many Thanks Bing,</p>\n<p>I give an updated details of my building environment at&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/issues/14\">GitHub issue 14</a></p>\n<p>Cheers.&nbsp;</p>\n\n<p>[quote=Bing Xu;61437]</p>\n<p>I suggest you post in issue on <a href=\"https://github.com/antinucleon/cxxnet/issues\">Github</a>&nbsp;about building problem. It is about your pthread problem on your machine. I guess may be upgrade your gcc will help. But I am not sure because I never use Mac.</p>\n<p>You can add ```dev = cpu``` at global setting part, I mean no indent</p>\n<p>[quote=Jason;61436]</p>\n<p>Thanks for sharing the code. &nbsp;I have a&nbsp;problems when installing cxxnet&nbsp;on Ubuntu 14.04</p>\n<p>$ build.sh blas=1</p>\n<p><code></code><code><code>g++ -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o bin/cxxnet cxxnet/cxxnet_main.cpp cxxnet_data.o cxxnet_nnet_cpu.o cxxnet_nnet_gpu.o -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>/usr/bin/ld: cxxnet_data.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'<br>//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line<br>collect2: error: ld returned 1 exit status<br>make: *** [bin/cxxnet] Error 1<br></code></code></p>\n<p>How could I fix it?</p>\n<p>Meanwhile, do you mean add 'dev=cpu' to&nbsp;bowl.conf ?&nbsp; I didn't find&nbsp; 'dev=cpu' or&nbsp; 'dev=gpu' in any fil</p>\n<p>e. &nbsp;I guess that you are using GPU and it is the default option.</p>\n<p>Many Thanks</p>\n<p>[</p>\n<p>quote=Bing Xu;60440]</p>\n<p>You can, you need blas or MKL installed. Then set dev=cpu in config file</p>\n<p>[quote=Issac;60439]</p>\n<p>Thank you for your share.</p>\n<p>But I want to know, if I can run CXXNET with CPU?</p>\n<p>I just have a macbook with intel GPU...</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61442,
      "author_name": "blackeagle",
      "author_url": "",
      "post_date": "12/18/2014 03:23:38",
      "content": "<p>Hi Bing,</p>\n<p>When I run the gen_train.py function I am getting these warnings &quot;convert is not recognized as an internal or external command&quot;. Are you using a special python package to resize images?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61443,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/18/2014 03:25:08",
      "content": "<p>You need install&nbsp;<a href=\"http://www.imagemagick.org/\">http://www.imagemagick.org/</a>&nbsp;to use convert</p>\n<p>[quote=kartal;61442]</p>\n<p>Hi Bing,</p>\n<p>When I run the gen_train.py function I am getting these warnings &quot;convert is not recognized as an internal or external command&quot;. Are you using a special python package to resize images?</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61446,
      "author_name": "blackeagle",
      "author_url": "",
      "post_date": "12/18/2014 04:39:41",
      "content": "<p>OK thanks I did get gen_train.py to work but when I look at the converted images the original sizes are preserved. They are not 48x48 as suggested.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61447,
      "author_name": "blackeagle",
      "author_url": "",
      "post_date": "12/18/2014 05:07:59",
      "content": "<p>OK I figured out the problem. Maybe this is due to I am using MinGW in Windows but the correct form of the python code should be as below in order for the resizing to work.</p>\n\n<p>import os<br>import sys<br>import subprocess</p>\n<p>if len(sys.argv) &lt; 3:<br> print &quot;Usage: python gen_train.py input_folder output_folder&quot;<br> exit(1)</p>\n<p>fi = sys.argv[1]<br>fo = sys.argv[2]</p>\n<p>cmd = &quot;convert &quot;<br>classes = os.listdir(fi)</p>\n<p>os.chdir(fo)<br>for cls in classes:<br> try:<br> os.mkdir(cls)<br> except:<br> pass<br> imgs = os.listdir(fi + cls)<br> for img in imgs:<br> md = &quot;&quot;<br> md += cmd<br> md += fi + cls + &quot;/&quot; + img<br> md += &quot; -resize 48x48!&quot;<br> md += &quot; &quot; + fo + cls + &quot;/&quot; + img<br> os.system(md)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61471,
      "author_name": "michaelbewley",
      "author_url": "",
      "post_date": "12/18/2014 11:25:20",
      "content": "<p>Thanks Bing, I just got it working and submitted results.</p>\n<p>For others - I'm using Ubuntu 14.04, and had to muck around with the CXXNet Makefiles a bit, adding -I and -L references to the CUDA library locations.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61497,
      "author_name": "jfkingiii",
      "author_url": "",
      "post_date": "12/18/2014 17:12:16",
      "content": "<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285.</p>\n<p>[/quote]</p>\n\n<p>Before I try to install it, can it be expected to work on an NVIDIA GRID K520? This is an older model with compute capability 3.0.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61503,
      "author_name": "terrychenism",
      "author_url": "",
      "post_date": "12/18/2014 20:45:31",
      "content": "<p>Hi, Bing,&nbsp;</p>\n<p>I follow your net config file and create a caffe proto file as attached, but it cannot get your result. Is there any difference between your cxxnet and caffe?&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61522,
      "author_name": "clustifier",
      "author_url": "",
      "post_date": "12/19/2014 06:10:19",
      "content": "<p>Hi Bing,</p>\n<p>After compiling successfully for cpu and adding the dev=cpu I'm getting this:</p>\n<p><code>$ ../../bin/cxxnet bowl.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=128<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 256,3,48,48<br>node[1].shape: 256,96,12,12<br>node[2].shape: 256,96,12,12<br>node[3].shape: 256,96,6,6<br>node[4].shape: 256,128,8,8<br>node[5].shape: 256,128,8,8<br>node[6].shape: 256,128,8,8<br>node[7].shape: 256,128,8,8<br>node[8].shape: 256,128,4,4<br>node[9].shape: 1,1,256,2048<br>node[10].shape: 1,1,256,512<br>node[11].shape: 1,1,256,512<br>node[12].shape: 1,1,256,512<br>node[13].shape: 1,1,256,512<br>node[14].shape: 1,1,256,121<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 9000] images processed, 1 sec elapsedError:decoding fail</code></p>\n<p>Can you please see what I might do wrong?</p>\n<p>Thanks,</p>\n<p>C</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61523,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/19/2014 06:12:01",
      "content": "<p>It means opencv can't decode image in the binary file. I suggest you check your opencv and process in generating binary file.</p>\n<p>[quote=clustifier;61522]</p>\n<p>Hi Bing,</p>\n<p>After compiling successfully for cpu and adding the dev=cpu I'm getting this:</p>\n<p><code>$ ../../bin/cxxnet bowl.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=128<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 256,3,48,48<br>node[1].shape: 256,96,12,12<br>node[2].shape: 256,96,12,12<br>node[3].shape: 256,96,6,6<br>node[4].shape: 256,128,8,8<br>node[5].shape: 256,128,8,8<br>node[6].shape: 256,128,8,8<br>node[7].shape: 256,128,8,8<br>node[8].shape: 256,128,4,4<br>node[9].shape: 1,1,256,2048<br>node[10].shape: 1,1,256,512<br>node[11].shape: 1,1,256,512<br>node[12].shape: 1,1,256,512<br>node[13].shape: 1,1,256,512<br>node[14].shape: 1,1,256,121<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 9000] images processed, 1 sec elapsedError:decoding fail</code></p>\n<p>Can you please see what I might do wrong?</p>\n<p>Thanks,</p>\n<p>C</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61528,
      "author_name": "brundage",
      "author_url": "",
      "post_date": "12/19/2014 08:39:46",
      "content": "<p>It seems you need either Intel MKL or NVIDIA CUDA installed to use this?</p>\n<p>build.sh blas=1 =&gt;</p>\n<p>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found</p>\n<p>MSHADOW_USE_CUDA=0 ./build.sh blas=1 =&gt;</p>\n<p>./mshadow/mshadow/tensor_base.h:282:13: error: use of undeclared identifier 'exit'</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61575,
      "author_name": "gregoirel",
      "author_url": "",
      "post_date": "12/20/2014 14:48:42",
      "content": "<p>[quote=Michael Bewley;61471]</p>\n<p>Thanks Bing, I just got it working and submitted results.</p>\n<p>For others - I'm using Ubuntu 14.04, and had to muck around with the CXXNet Makefiles a bit, adding -I and -L references to the CUDA library locations.</p>\n<p>[/quote]</p>\n\n<p>Michael, I followed the same path you took but unfortunately, when I run cxxnet bowl.conf, I get a segmentation fault.</p>\n<p>Would you care to confirm the md5sum for the 2 bin files? I get :</p>\n<p>a96b2dc558eb9662b417d9b23ca0fdd4 train.bin</p>\n<p>891b7e1072d146f850d43cad8b0dd808 test.bin</p>\n<p>Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61581,
      "author_name": "emolson",
      "author_url": "",
      "post_date": "12/20/2014 16:07:01",
      "content": "<p>[quote=gregl;61575]</p>\n<p>[quote=Michael Bewley;61471]</p>\n<p>Thanks Bing, I just got it working and submitted results.</p>\n<p>For others - I'm using Ubuntu 14.04, and had to muck around with the CXXNet Makefiles a bit, adding -I and -L references to the CUDA library locations.</p>\n<p>[/quote]</p>\n<p>Michael, I followed the same path you took but unfortunately, when I run cxxnet bowl.conf, I get a segmentation fault.</p>\n<p>Would you care to confirm the md5sum for the 2 bin files? I get :</p>\n<p>a96b2dc558eb9662b417d9b23ca0fdd4 train.bin</p>\n<p>891b7e1072d146f850d43cad8b0dd808 test.bin</p>\n<p>Thanks!</p>\n<p>[/quote]</p>\n<p>For me:</p>\n<p>50cd388bc640b63e2144b551fb6260fd test.bin<br>9f847cc39b7fee93e842a668cd4e72b4 train.bin</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61597,
      "author_name": "clustifier",
      "author_url": "",
      "post_date": "12/20/2014 19:22:22",
      "content": "<p>for me:</p>\n<p><code>ff0bee47c19b6c7ab79b29d3c37872b2</code></p>\n<p><code></code><code>79343a11c7f80cd3b8e94712ae42cdc8</code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61598,
      "author_name": "gregoirel",
      "author_url": "",
      "post_date": "12/20/2014 19:45:03",
      "content": "<p>I realize the checksum of the bin file is probably irrelevant because machine dependent...</p>\n<p>Anyway I fixed the issue and was able to get the 1.38 score. It seems my problem was to have built opencv <strong>before</strong> installing CUDA.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61599,
      "author_name": "clustifier",
      "author_url": "",
      "post_date": "12/20/2014 19:56:25",
      "content": "<p>[quote=gregl;61598]</p>\n<p>I realize the checksum of the bin file is probably irrelevant because machine dependent...</p>\n<p>[/quote]</p>\n<p>I don't think it is true.</p>\n<p>What is your md5&nbsp;checksums now?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61600,
      "author_name": "gregoirel",
      "author_url": "",
      "post_date": "12/20/2014 20:28:29",
      "content": "<p>[quote=clustifier;61599]</p>\n<p>[quote=gregl;61598]</p>\n<p>I realize the checksum of the bin file is probably irrelevant because machine dependent...</p>\n<p>[/quote]</p>\n<p>I don't think it is true.</p>\n<p>What is your md5&nbsp;checksums now?</p>\n<p>[/quote]</p>\n\n<p>Same as before. im2bin was working all along for me, only cxxnet was not.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61601,
      "author_name": "clustifier",
      "author_url": "",
      "post_date": "12/20/2014 21:18:16",
      "content": "<p>thanks.</p>\n<p>but why our md5's are different?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61632,
      "author_name": "gregoirel",
      "author_url": "",
      "post_date": "12/21/2014 19:34:01",
      "content": "<p>[quote=clustifier;61601]</p>\n<p>thanks.</p>\n<p>but why our md5's are different?</p>\n<p>[/quote]</p>\n\n<p>I built im2bin with blas, not the default mlk.</p>\n<p>Also, upstream, the md5sum of train.lst is:</p>\n<p>399ab27e818cabcb5bd2158c15451a80 train.lst</p>\n<p>with the first 5 lines:</p>\n<p>3406 10 data/train/chaetognath_non_sagitta/23677.jpg<br>22212 90 data/train/radiolarian_chain/157296.jpg<br>19772 83 data/train/protist_fuzzy_olive/147898.jpg<br>23435 98 data/train/siphonophore_calycophoran_rocketship_young/36262.jpg<br>18710 72 data/train/hydromedusae_solmaris/47760.jpg</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61633,
      "author_name": "emolson",
      "author_url": "",
      "post_date": "12/21/2014 19:44:41",
      "content": "<p>My train.lst is different. I think the issue is that os.listdir does not guarantee any ordering of the results.</p>\n<p>[quote=gregl;61632]</p>\n<p>[quote=clustifier;61601]</p>\n<p>thanks.</p>\n<p>but why our md5's are different?</p>\n<p>[/quote]</p>\n<p>I built im2bin with blas, not the default mlk.</p>\n<p>Also, upstream, the md5sum of train.lst is:</p>\n<p>399ab27e818cabcb5bd2158c15451a80 train.lst</p>\n<p>with the first 5 lines:</p>\n<p>3406 10 data/train/chaetognath_non_sagitta/23677.jpg<br>22212 90 data/train/radiolarian_chain/157296.jpg<br>19772 83 data/train/protist_fuzzy_olive/147898.jpg<br>23435 98 data/train/siphonophore_calycophoran_rocketship_young/36262.jpg<br>18710 72 data/train/hydromedusae_solmaris/47760.jpg</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61726,
      "author_name": "nissanpow",
      "author_url": "",
      "post_date": "12/23/2014 01:56:21",
      "content": "<p>Include stdlib.h in tensor_base.h to fix the error about 'exit'.</p>\n\n\n<p>[quote=Synthient;61528]</p>\n<p>It seems you need either Intel MKL or NVIDIA CUDA installed to use this?</p>\n<p>build.sh blas=1 =&gt;</p>\n<p>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found</p>\n<p>MSHADOW_USE_CUDA=0 ./build.sh blas=1 =&gt;</p>\n<p>./mshadow/mshadow/tensor_base.h:282:13: error: use of undeclared identifier 'exit'</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61732,
      "author_name": "nissanpow",
      "author_url": "",
      "post_date": "12/23/2014 05:19:24",
      "content": "<p>Hi, this is quite interesting.&nbsp;CXXNET was way easier to setup compared to caffe. I have some quick questions about CXXNET though:</p>\n<p>- is it possible to resume training from a saved model file?</p>\n<p>- is it possible to extract features from a particular layer?</p>\n<p>- is there some documentation about what the various parameters in the config file mean? eg. wmat:wd</p>\n<p>- how is the performance of cxxnet vs caffe?</p>\n\n\n<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61733,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "12/23/2014 05:53:49",
      "content": "<p>Please refer to the wiki on Github&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/wiki\">https://github.com/antinucleon/cxxnet/wiki</a></p>\n<p>[quote=Nissan Pow;61732]</p>\n<p>Hi, this is quite interesting.&nbsp;CXXNET was way easier to setup compared to caffe. I have some quick questions about CXXNET though:</p>\n<p>- is it possible to resume training from a saved model file?</p>\n<p>- is it possible to extract features from a particular layer?</p>\n<p>- is there some documentation about what the various parameters in the config file mean? eg. wmat:wd</p>\n<p>- how is the performance of cxxnet vs caffe?</p>\n<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61783,
      "author_name": "clustifier",
      "author_url": "",
      "post_date": "12/23/2014 22:04:51",
      "content": "<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61786,
      "author_name": "mconway",
      "author_url": "",
      "post_date": "12/23/2014 22:18:49",
      "content": "<p>[quote=clustifier;61783]</p>\n<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>\n<p>[/quote]</p>\n<p>Nope, trying though... can't seem to get by the includes. The file cblas.h is actually part of the Accelerate framework on the Mac, but now we are trying to find cublas.h. Fetched mshadow just fine...</p>\n<p>====================================================================</p>\n<p>$ MSHADOW_USE_CUDA=0 ./build.sh blas=1</p>\n<p>g++ -c -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -I/usr/lib -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o cxxnet_data.o cxxnet/io/cxxnet_data.cpp<br>In file included from cxxnet/io/cxxnet_data.cpp:6:<br>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found<br> #include &lt;cublas.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61792,
      "author_name": "nissanpow",
      "author_url": "",
      "post_date": "12/23/2014 23:22:58",
      "content": "<p>Yes, I'm using it on 10.10 with cuda. Where are you stuck at?</p>\n\n<p>[quote=clustifier;61783]</p>\n<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61793,
      "author_name": "nissanpow",
      "author_url": "",
      "post_date": "12/23/2014 23:24:25",
      "content": "<p>cublas.h is located at&nbsp;/usr/local/cuda/include/, which is a symlink to&nbsp;/Developer/NVIDIA/CUDA-6.5/include for me.</p>\n<p>Add -I/usr/local/cuda/include/ to your Makefile.</p>\n\n\n<p>[quote=Mark Conway;61786]</p>\n<p>[quote=clustifier;61783]</p>\n<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>\n<p>[/quote]</p>\n<p>Nope, trying though... can't seem to get by the includes. The file cblas.h is actually part of the Accelerate framework on the Mac, but now we are trying to find cublas.h. Fetched mshadow just fine...</p>\n<p>====================================================================</p>\n<p>$ MSHADOW_USE_CUDA=0 ./build.sh blas=1</p>\n<p>g++ -c -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -I/usr/lib -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o cxxnet_data.o cxxnet/io/cxxnet_data.cpp<br>In file included from cxxnet/io/cxxnet_data.cpp:6:<br>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found<br> #include &lt;cublas.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61828,
      "author_name": "luyitian",
      "author_url": "",
      "post_date": "12/24/2014 14:51:04",
      "content": "<p>Hi, anyone here uses MacOS and successfully install CXXNET? I tried to but met tons of ERRORs T.T</p>\n<p>------------------------</p>\n<p>First I use 'brew install' to get opencv and installed CUDA toolbox. Then I run ' sudo ./build.sh blas=1' and failed with 'cannot found cblas.h'. I googled cblas and found it is included in Mac's Accelerate framework. So I naively thought replacing cblas.h with&nbsp;Accelerate.h will solve this problem.</p>\n<p><code>#if MSHADOW_USE_CBLAS<br>#include Accelerate/Accelerate.h</code></p>\n<p>------------------------</p>\n<p>Then I met following error:</p>\n<p><code>/usr/include/dispatch/object.h(143): error: expected an identifier</code><code>/usr/include/dispatch/object.h(362): error: identifier &quot;dispatch_block_t&quot; is undefined</code><code>/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBundle.h(148): error: format argument does not have string type</code></p>\n<p>I solved this under the guide in :http://stackoverflow.com/questions/26527077/compiling-with-accelerate-framework-on-osx-yosemite</p>\n<p>------------------------</p>\n<p>Then this error occurs: 'ld: library not found for -lcudart' this is easy to solve, just edit the -I and -L args. on my macbook it is:</p>\n<p>-I/Developer/NVIDIA/CUDA-6.5/include/ -L/Developer/NVIDIA/CUDA-6.5/lib</p>\n<p>------------------------</p>\n<p>Then I got this error:</p>\n<p><code>Undefined symbols for architecture x86_64:<br> &quot;std::string::_Rep::_M_destroy(std::allocator&lt;char&gt; const&amp;)&quot;, referenced from:<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br>......<br>std::vector&lt;cxxnet::ILayer*, std::allocator&lt;cxxnet::ILayer*&gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::ILayer**, std::vector&lt;cxxnet::ILayer*, std::allocator&lt;cxxnet::ILayer*&gt; &gt; &gt;, cxxnet::ILayer* const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;cxxnet::Node&lt;mshadow::gpu&gt;, std::allocator&lt;cxxnet::Node&lt;mshadow::gpu&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::Node&lt;mshadow::gpu&gt;*, std::vector&lt;cxxnet::Node&lt;mshadow::gpu&gt;, std::allocator&lt;cxxnet::Node&lt;mshadow::gpu&gt; &gt; &gt; &gt;, cxxnet::Node&lt;mshadow::gpu&gt; const&amp;) in cxxnet_nnet_gpu.o<br> ...<br>ld: symbol(s) not found for architecture x86_64</code></p>\n<p>I googled it and found this may due to the update of xcode from 5.x to 6.0(I use the newest xcode). And I have no idea how to fix it.</p>\n<p>------------------------</p>\n<p>Finally I give up using cblas and turn to mkl in&nbsp;https://software.intel.com/en-us/intel-parallel-studio-xe. Currently I am downloading the 30days free trial for XE (does XE have a free version for student? I could not find any link to it)</p>\n<p>------------------------</p>\n<p>update: I installed OpenBLAS and add '-I/opt/OpenBLAS/include' in makefile but still got an 'ld: symbol(s) not found for architecture x86_64' error. it seems CXXNET just cannot run on newest MacOS/xcode. Now I have give up and found&nbsp;alternatives.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61830,
      "author_name": "mconway",
      "author_url": "",
      "post_date": "12/24/2014 15:15:35",
      "content": "<p>I took the same route you did. I installed Intel Parallel Studio to get MKL, then set up all the include paths, and was able to at least compile some of the objects. But then the make was trying to compile with &quot;nvcc&quot; to create the cxxnet executable and that died a horrible death. I gave up after a few hours... it was like hacking through the jungle with a machete. Best of luck!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61848,
      "author_name": "tudinhnguyen",
      "author_url": "",
      "post_date": "12/25/2014 01:25:02",
      "content": "<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>May I ask about the training NLL and the distribution of predicted labels for test data?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61849,
      "author_name": "tudinhnguyen",
      "author_url": "",
      "post_date": "12/25/2014 01:29:09",
      "content": "<p>[quote=Bing Xu;60426]</p>\n<p>Hi all,</p>\n<p>I just made a guide of how to use conv net to achieve NLL of 1.382285. On a modern&nbsp;GPU, it only takes 5 minute to get this result.</p>\n<p>Please check&nbsp;<a href=\"https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl\">https://github.com/antinucleon/cxxnet/tree/master/example/kaggle_bowl</a>&nbsp;, and don't forget to star&nbsp;<a href=\"https://github.com/antinucleon/cxxnet\">CXXNET</a>&nbsp;:)</p>\n<p>CXXNET is yet another neural network toolkit. It&nbsp;is able to&nbsp;run on NVIDIA GPU or CPU. If you want to run on CPU, you only need OpenCV &amp; MKL(or OpenBlas/ATLAS) installed. No other dependence is required. &nbsp;</p>\n<p>PS. I made it in a hurry, so if there is any problem please let me know!</p>\n<p>[/quote]</p>\n<p>May I ask about the training NLL and the distribution of predicted labels for test data?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61887,
      "author_name": "mconway",
      "author_url": "",
      "post_date": "12/26/2014 02:20:38",
      "content": "<p>Hi Bing:</p>\n<p>Running on Mac Yosemite, got everything built, converted the images, but now getting the following error:</p>\n<p><strong>Error:Assignment: Shape of Tensors in expression is not consistent with target</strong></p>\n<p>localhost:kaggle_bowl$ ../../bin/cxxnet bowl.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=128<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 256,3,48,48<br>node[1].shape: 256,96,12,12<br>node[2].shape: 256,96,12,12<br>node[3].shape: 256,96,6,6<br>node[4].shape: 256,128,8,8<br>node[5].shape: 256,128,8,8<br>node[6].shape: 256,128,8,8<br>node[7].shape: 256,128,8,8<br>node[8].shape: 256,128,4,4<br>node[9].shape: 1,1,256,2048<br>node[10].shape: 1,1,256,512<br>node[11].shape: 1,1,256,512<br>node[12].shape: 1,1,256,512<br>node[13].shape: 1,1,256,512<br>node[14].shape: 1,1,256,121<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br><strong>Error:Assignment: Shape of Tensors in expression is not consistent with target</strong></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61917,
      "author_name": "vkuznet",
      "author_url": "",
      "post_date": "12/26/2014 21:30:33",
      "content": "<p>I have couple of&nbsp;questions with cxxnet/convert tools. First, why &quot;convert -resize 48x48\\!&quot; has exclamation mark? I can't find anything in convert/ImageMagik documentation. If I remove it I got similar error as Mark Conway posted, if I keep it I don't have this issue. Second question, when I run cxxnet with default configuration, it exit with the following:</p>\n<p><code>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 30000] images processed, 1 sec elapsedsave mean image to models/image_mean.bin..<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>loading mean image from models/image_mean.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>update round 0</code></p>\n<p>and only generates models/0000.model file and models/image_mean.bin? The exit status I get (I printed via echo $?) is 1. No other messages. I don't know what's going wrong, do I have insufficient RAM or program is crashed? The code uses&nbsp;Quadro NVS 295 GPU.</p>\n<p>Thanks,</p>\n<p>Valentin</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61919,
      "author_name": "nissanpow",
      "author_url": "",
      "post_date": "12/26/2014 23:01:27",
      "content": "<p>The exclamation mark means ignore aspect ratio:</p>\n<p>[quote]</p>\n<p>Ignore Aspect Ratio ('!' flag)<br>If you want you can force &quot;-resize&quot; to ignore the aspect ratio and distort the image so it always generates an image exactly the size specified. This is done by adding the character '!' to the size. Unfortunately this character is also sometimes used for special purposes by various UNIX command line shells. So you may have to escape the character somehow to preserve it.</p>\n<p>[/quote]</p>\n<p>Reference: http://www.imagemagick.org/Usage/resize/</p>\n\n<p>[quote=vk.net;61917]</p>\n<p>why &quot;convert -resize 48x48\\!&quot; has exclamation mark?</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61929,
      "author_name": "billyinn",
      "author_url": "",
      "post_date": "12/27/2014 13:12:12",
      "content": "<p>I've written a summary of the installation of cxxnet on CentOS via blas, based on the error I've encountered during the installation.&nbsp;</p>\n<p>Here is the summary:&nbsp;<a href=\"https://github.com/billy-inn/cxxnet/tree/master/Install\">https://github.com/billy-inn/cxxnet/tree/master/Install</a></p>\n<p>Hope it may help.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61934,
      "author_name": "mconway",
      "author_url": "",
      "post_date": "12/27/2014 15:26:39",
      "content": "<p>Hi Valentin:</p>\n<p>I'm getting pretty close. I believe the &quot;Shape of Tensors not consistent&quot; error is related to the image list processed by cxxnet, as you point out. So, I will experiment with the convert options and see if we can finish this last step.</p>\n<p>Regards,</p>\n<p>Mark</p>\n<p>[quote=vk.net;61917]</p>\n<p>I have couple of&nbsp;questions with cxxnet/convert tools. First, why &quot;convert -resize 48x48\\!&quot; has exclamation mark? I can't find anything in convert/ImageMagik documentation. If I remove it I got similar error as Mark Conway posted, if I keep it I don't have this issue. Second question, when I run cxxnet with default configuration, it exit with the following:</p>\n<p><code>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 30000] images processed, 1 sec elapsedsave mean image to models/image_mean.bin..<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>loading mean image from models/image_mean.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>update round 0</code></p>\n<p>and only generates models/0000.model file and models/image_mean.bin? The exit status I get (I printed via echo $?) is 1. No other messages. I don't know what's going wrong, do I have insufficient RAM or program is crashed? The code uses&nbsp;Quadro NVS 295 GPU.</p>\n<p>Thanks,</p>\n<p>Valentin</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62072,
      "author_name": "nanochef",
      "author_url": "",
      "post_date": "12/30/2014 00:17:00",
      "content": "<p>Nissan, can you elaborate where to add -I/usr/local/cuda/include in the Makefile? I'm a noob so it isn't obvious. :)</p>\n<p>[quote=Nissan Pow;61793]</p>\n<p>cublas.h is located at&nbsp;/usr/local/cuda/include/, which is a symlink to&nbsp;/Developer/NVIDIA/CUDA-6.5/include for me.</p>\n<p>Add -I/usr/local/cuda/include/ to your Makefile.</p>\n<p>[quote=Mark Conway;61786]</p>\n<p>[quote=clustifier;61783]</p>\n<p>Has someone used&nbsp;CXXNET on mac osx successfully?</p>\n<p>(with or without cuda)</p>\n<p>[/quote]</p>\n<p>Nope, trying though... can't seem to get by the includes. The file cblas.h is actually part of the Accelerate framework on the Mac, but now we are trying to find cublas.h. Fetched mshadow just fine...</p>\n<p>====================================================================</p>\n<p>$ MSHADOW_USE_CUDA=0 ./build.sh blas=1</p>\n<p>g++ -c -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -I/usr/lib -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -o cxxnet_data.o cxxnet/io/cxxnet_data.cpp<br>In file included from cxxnet/io/cxxnet_data.cpp:6:<br>In file included from ./mshadow/mshadow/tensor.h:11:<br>./mshadow/mshadow/tensor_base.h:83:12: fatal error: 'cublas.h' file not found<br> #include &lt;cublas.h&gt;<br> ^<br>1 error generated.<br>make: *** [cxxnet_data.o] Error 1</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62073,
      "author_name": "vkuznet",
      "author_url": "",
      "post_date": "12/30/2014 00:45:14",
      "content": "<p>Here the part of Makefile I modified:</p>\n<p><code>export CFLAGS = -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/<br>CFLAGS+=-I/opt/cuda/include</code></p>\n<p><code>ifeq ($(blas),1)<br> LDFLAGS= -L/opt/cuda/lib -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lcblas -lgfortran -lblas<br> CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1<br>else<br> LDFLAGS= -lm -lcudart -lcublas -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lpthread -lcurand -lz `pkg-config --libs opencv`<br>endif</code></p>\n<p>Basically you add additional CFLAGS with you CUDA include path and modiy LDFLAGS as well with path to CUDA libraries. The CUDA toolkit (https://developer.nvidia.com/cuda-toolkit) comes from NVidia web site and it includes cublas.h</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62083,
      "author_name": "esorar",
      "author_url": "",
      "post_date": "12/30/2014 04:34:15",
      "content": "<p>Thanks Bing for this eye opening example by running it&nbsp; with GPU Cuda cores.</p>\n<p>As much as I can follow you use one of Linux flavor to utilize GPU and maybe some other people has success on MacOS. I can run your examples on CPU on Ubuntu VM with vmplayer on a Win8.1 host however I wonder whether I can utilize host Nvidia GPU tied to host Win8.1. Is there Anybody managed to run this on Win8.1 OS with GPU? There is a MinGW solution: http://pavel.surmenok.com/2014/05/31/installing-theano-with-gpu-on-windows-64-bit/</p>\n<p>but not yet tried maybe somebody can point a better, like cygwin possibility?</p>\n<p>Thanks</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62150,
      "author_name": "jiweiliu",
      "author_url": "",
      "post_date": "12/31/2014 21:30:13",
      "content": "<p>Hi everyone, finally I installed cxxnet on my laptop, which has a low-end Geforce GT 630m graphic card. The score is 1.42 and the training time is one hour. But I'm still happy it works. Thank you, Bing! :D</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62194,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "01/01/2015 23:43:31",
      "content": "<p>I am using a CNN approach using Caffe rather than cxxnet.&nbsp; My network structure is very similar to what is defined in Bing's shared code.&nbsp; Out of interest, can anyone tell me how many training iterations the cxxnet code runs for?&nbsp; I can't seem to see where that is defined in the code.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62204,
      "author_name": "gregoirel",
      "author_url": "",
      "post_date": "01/02/2015 07:29:46",
      "content": "<p>[quote=Senecaur;62194]</p>\n<p>I am using a CNN approach using Caffe rather than cxxnet.&nbsp; My network structure is very similar to what is defined in Bing's shared code.&nbsp; Out of interest, can anyone tell me how many training iterations the cxxnet code runs for?&nbsp; I can't seem to see where that is defined in the code.</p>\n<p>[/quote]</p>\n\n<p>45 in Bing's example. The entries in the .conf file are &quot;max_round&quot; and &quot;num_round&quot;.</p>\n\n<p>G</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62214,
      "author_name": "abhishek",
      "author_url": "",
      "post_date": "01/02/2015 14:56:46",
      "content": "<p>[quote=gregl;61632]</p>\n<p>[quote=clustifier;61601]</p>\n<p>thanks.</p>\n<p>but why our md5's are different?</p>\n<p>[/quote]</p>\n<p>I built im2bin with blas, not the default mlk.</p>\n<p>Also, upstream, the md5sum of train.lst is:</p>\n<p>399ab27e818cabcb5bd2158c15451a80 train.lst</p>\n<p>with the first 5 lines:</p>\n<p>3406 10 data/train/chaetognath_non_sagitta/23677.jpg<br>22212 90 data/train/radiolarian_chain/157296.jpg<br>19772 83 data/train/protist_fuzzy_olive/147898.jpg<br>23435 98 data/train/siphonophore_calycophoran_rocketship_young/36262.jpg<br>18710 72 data/train/hydromedusae_solmaris/47760.jpg</p>\n<p>[/quote]</p>\n<p>how did you build im2bin with blas when mshadow needs mkl?</p>\n\n<p>EDIT: Nevermind</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62236,
      "author_name": "",
      "author_url": "",
      "post_date": "01/03/2015 17:39:20",
      "content": "<p>Hi Valentin,</p>\n<p>in case you're still having the issue you described in your second question, I had exactly the same with a GTX 680 GPU.</p>\n<p>I discovered a warning during the compilation of 'tensor_gpu-inl.cuh' which is part of mshadow and located in 'cxxnet-master/mshadow/mshadow/cuda'. The warning said that the CUDA architecture of the GPU could not be determined and will be set to 2.0 automatically. It seemed that the __CUDA_ARCH__ macro, that is checked for the architecture, was broken. Setting this macro by hand like</p>\n<p>#define __CUDA_ARCH__ 300</p>\n<p>resolved the issue for me (in my case, the 300 comes from the GTX 680 having compute capability 3.0). Maybe this can help with your problem too...</p>\n<p>Best,</p>\n<p>Matthias</p>\n<p>p.s.: Thanks a lot Bing for making this available!</p>\n<p>[quote=vk.net;61917]</p>\n<p>Second question, when I run cxxnet with default configuration, it exit with the following:</p>\n<p><code>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br>[ 30000] images processed, 1 sec elapsedsave mean image to models/image_mean.bin..<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>loading mean image from models/image_mean.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>update round 0</code></p>\n<p>and only generates models/0000.model file and models/image_mean.bin? The exit status I get (I printed via echo $?) is 1. No other messages. I don't know what's going wrong, do I have insufficient RAM or program is crashed? The code uses&nbsp;Quadro NVS 295 GPU.</p>\n<p>Thanks,</p>\n<p>Valentin</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62285,
      "author_name": "telser",
      "author_url": "",
      "post_date": "01/05/2015 03:08:59",
      "content": "<p>[quote=vk.net;62073]</p>\n<p>Here the part of Makefile I modified:</p>\n<p><code>export CFLAGS = -Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/<br>CFLAGS+=-I/opt/cuda/include</code></p>\n<p><code>ifeq ($(blas),1)<br> LDFLAGS= -L/opt/cuda/lib -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lcblas -lgfortran -lblas<br> CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1<br>else<br> LDFLAGS= -lm -lcudart -lcublas -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lpthread -lcurand -lz `pkg-config --libs opencv`<br>endif</code></p>\n<p>Basically you add additional CFLAGS with you CUDA include path and modiy LDFLAGS as well with path to CUDA libraries. The CUDA toolkit (https://developer.nvidia.com/cuda-toolkit) comes from NVidia web site and it includes cublas.h</p>\n<p>[/quote]</p>\n\n<p>Thanks for the advice; this resolved the cublas issue. &nbsp;I was wondering if it worked for you with just that, though; after making the modification, I now get&nbsp;</p>\n<p>sh build.sh blas=1</p>\n<p><br>Fetch mshadow...<br>fatal: destination path 'mshadow' already exists and is not an empty directory.<br>nvcc -c -o cxxnet_nnet_gpu.o --use_fast_math -g -O3 -ccbin g++ -Xcompiler &quot;-Wall -g -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I./mshadow/ -I/usr/local/cuda/include -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1&quot; cxxnet/nnet/cxxnet_nnet.cu<br>/bin/sh: 1: nvcc: not found<br>make: *** [cxxnet_nnet_gpu.o] Error 127</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62286,
      "author_name": "liweilin",
      "author_url": "",
      "post_date": "01/05/2015 03:58:17",
      "content": "<p>Torgos, looks like you havn't added CUDA to your path?? i.e. something like:</p>\n<p>export PATH=$PATH:/usr/local/cuda-6.5/bin<br>export&nbsp;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-6.5/lib64:/usr/local/cuda-6.5/include</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62302,
      "author_name": "telser",
      "author_url": "",
      "post_date": "01/05/2015 16:44:08",
      "content": "<p>Right you are; I thought I had added it to my bashrc. &nbsp;Thanks!</p>\n<p>Edit.Unfortunately still seems to be broken, though. &nbsp;Blargh. &nbsp;Has anyone gotten this installed on a Ubuntu 14.04 on an Amazon GPU instance?</p>\n<p>Edit 2: &nbsp;I think I got it; &nbsp;the ubuntu distribution is 64 bit, so you will get compatibility issues with the 32 bit library; point the makefile at&nbsp;-L/usr/local/cuda/lib64 instead. &nbsp;You also need to add the -pthread to</p>\n<p>CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -pthread</p>\n<p>as per</p>\n<p>https://github.com/antinucleon/cxxnet/issues/14</p>\n<p>No errors (other than 'mshadow already exists') when running&nbsp;sh build.sh blas=1 after that. &nbsp;Still need to figure out what paths to change the Makefile for im2bin, though.</p>\n<p>Edit 3. &nbsp;Modify the first few lines in the im2bin Makefile to&nbsp;</p>\n<p>export CFLAGS = -Wall -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I../mshadow/ -I..</p>\n<p>CFLAGS+=-I/usr/local/cuda/include<br>export LDFLAGS=-L/usr/local/cuda/lib64 -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>export NVCCFLAGS = -g -O3 -ccbin $(CXX)<br>CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -pthread</p>\n\n<p>It should compile correctly now; unfortunately, the actual command doesn't work! I suspect that the issue was in the argument passed when train.lst was generated.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62324,
      "author_name": "griesrt",
      "author_url": "",
      "post_date": "01/06/2015 02:34:55",
      "content": "<p>Did anyone get it running on the Macbook on OSX? &nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62328,
      "author_name": "jfkingiii",
      "author_url": "",
      "post_date": "01/06/2015 04:55:00",
      "content": "<p>I stumbled across this on the caffe github repo&nbsp;today:</p>\n<p>&quot;Be aware of the competing fast GPU neural network library CXXNET&quot;</p>\n<p>https://github.com/BVLC/caffe/issues/382</p>\n<p>I am so impressed with with what Tianqi and Bing have accomplished with cxxnet and xgboost. Please, keep doing what you're doing!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62332,
      "author_name": "griesrt",
      "author_url": "",
      "post_date": "01/06/2015 06:50:55",
      "content": "<p>Okay, I got past a few problems but now I'm running into this:</p>\n<p>Undefined symbols for architecture x86_64:<br> &quot;std::string::_Rep::_M_destroy(std::allocator&lt;char&gt; const&amp;)&quot;, referenced from:<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::~SGHMCUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::~SGDUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::~SGDUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::~SGHMCUpdater() in cxxnet_nnet_gpu.o<br> ...<br> &quot;std::string::_Rep::_S_empty_rep_storage&quot;, referenced from:<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::~SGHMCUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::~SGDUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::~SGDUpdater() in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::~SGHMCUpdater() in cxxnet_nnet_gpu.o<br> ...<br> &quot;std::string::assign(char const*, unsigned long)&quot;, referenced from:<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 1&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 1&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 1&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 3&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 3&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 3&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGHMCUpdater&lt;mshadow::gpu, 2&gt;::SGHMCUpdater(mshadow::Random&lt;mshadow::gpu&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 2&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 2&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::SGDUpdater&lt;mshadow::gpu, 2&gt;::SGDUpdater(mshadow::Tensor&lt;mshadow::gpu, 2&gt;&amp;, mshadow::Tensor&lt;mshadow::gpu, 2&gt;&amp;, char const*) in cxxnet_nnet_gpu.o<br> cxxnet::utils::MetricSet::AddMetric(char const*) in cxxnet_nnet_gpu.o<br> ...<br> &quot;std::string::assign(std::string const&amp;)&quot;, referenced from:<br> std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::allocator&lt;std::pair&lt;std::string, std::string&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;std::pair&lt;std::string, std::string&gt;*, std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::allocator&lt;std::pair&lt;std::string, std::string&gt; &gt; &gt; &gt;, std::pair&lt;std::string, std::string&gt; const&amp;) in cxxnet_nnet_gpu.o<br> &quot;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::basic_string(char const*, std::allocator&lt;char&gt; const&amp;)&quot;, referenced from:<br> cxxnet::NetConfigHelper::SetParam(char const*, char const*) in cxxnet_nnet_gpu.o<br> &quot;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::basic_string(std::string const&amp;)&quot;, referenced from:<br> cxxnet::NetConfigHelper::SetParam(char const*, char const*) in cxxnet_nnet_gpu.o<br> std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::allocator&lt;std::pair&lt;std::string, std::string&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;std::pair&lt;std::string, std::string&gt;*, std::vector&lt;std::pair&lt;std::string, std::string&gt;, std::allocator&lt;std::pair&lt;std::string, std::string&gt; &gt; &gt; &gt;, std::pair&lt;std::string, std::string&gt; const&amp;) in cxxnet_nnet_gpu.o<br> &quot;std::__throw_length_error(char const*)&quot;, referenced from:<br> std::vector&lt;float, std::allocator&lt;float&gt; &gt;::_M_fill_insert(__gnu_cxx::__normal_iterator&lt;float*, std::vector&lt;float, std::allocator&lt;float&gt; &gt; &gt;, unsigned long, float const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt;, std::allocator&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt; &gt; &gt;::_M_fill_insert(__gnu_cxx::__normal_iterator&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt;*, std::vector&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt;, std::allocator&lt;std::vector&lt;float, std::allocator&lt;float&gt; &gt; &gt; &gt; &gt;, unsigned long, std::vector&lt;float, std::allocator&lt;float&gt; &gt; const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;float, std::allocator&lt;float&gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;float*, std::vector&lt;float, std::allocator&lt;float&gt; &gt; &gt;, float const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;int, std::allocator&lt;int&gt; &gt;::_M_fill_insert(__gnu_cxx::__normal_iterator&lt;int*, std::vector&lt;int, std::allocator&lt;int&gt; &gt; &gt;, unsigned long, int const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;cxxnet::IUpdater*, std::allocator&lt;cxxnet::IUpdater*&gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::IUpdater**, std::vector&lt;cxxnet::IUpdater*, std::allocator&lt;cxxnet::IUpdater*&gt; &gt; &gt;, cxxnet::IUpdater* const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;cxxnet::ILayer*, std::allocator&lt;cxxnet::ILayer*&gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::ILayer**, std::vector&lt;cxxnet::ILayer*, std::allocator&lt;cxxnet::ILayer*&gt; &gt; &gt;, cxxnet::ILayer* const&amp;) in cxxnet_nnet_gpu.o<br> std::vector&lt;cxxnet::Node&lt;mshadow::gpu&gt;, std::allocator&lt;cxxnet::Node&lt;mshadow::gpu&gt; &gt; &gt;::_M_insert_aux(__gnu_cxx::__normal_iterator&lt;cxxnet::Node&lt;mshadow::gpu&gt;*, std::vector&lt;cxxnet::Node&lt;mshadow::gpu&gt;, std::allocator&lt;cxxnet::Node&lt;mshadow::gpu&gt; &gt; &gt; &gt;, cxxnet::Node&lt;mshadow::gpu&gt; const&amp;) in cxxnet_nnet_gpu.o<br> ...<br>ld: symbol(s) not found for architecture x86_64<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>make: *** [bin/cxxnet] Error 1</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62334,
      "author_name": "mesolithic",
      "author_url": "",
      "post_date": "01/06/2015 09:08:50",
      "content": "<p>[quote=Torgos;62302]</p>\n<p>Edit 3. &nbsp;Modify the first few lines in the im2bin Makefile to&nbsp;</p>\n<p>export CFLAGS = -Wall -O3 -msse3 -Wno-unknown-pragmas -funroll-loops -I../mshadow/ -I..</p>\n<p>CFLAGS+=-I/usr/local/cuda/include<br>export LDFLAGS=-L/usr/local/cuda/lib64 -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` -lblas<br>export NVCCFLAGS = -g -O3 -ccbin $(CXX)<br>CFLAGS+= -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -pthread</p>\n<p>It should compile correctly now; unfortunately, the actual command doesn't work! I suspect that the issue was in the argument passed when train.lst was generated.</p>\n<p>[/quote]<br><br>This bit worked for me. Thanks.<br><br>At first the command didn't work for me either and I was wondering why. Turns out there was a permissions issue cos I compiled the im2bin on an mounted NTFS partition instead of EXT. Ended up moving the executable to the EXT partition, gave chmod +x and command ran smoothly.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62346,
      "author_name": "vkuznet",
      "author_url": "",
      "post_date": "01/06/2015 12:58:44",
      "content": "<p>To&nbsp;Matthias: indeed you found a remedy. I applied macro definition and recompiled the code. Now it runs!!! So, for those who experience silent crash, just follow&nbsp;Matthias advice and define&nbsp;__CUDA_ARCH__ in&nbsp;cxxnet/mshadow/mshadow/cuda/tensor_gpu-inl.cuh file.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62347,
      "author_name": "abhishek",
      "author_url": "",
      "post_date": "01/06/2015 13:00:13",
      "content": "<p>is it possible to compile CXXNET without OpenCV?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62378,
      "author_name": "griesrt",
      "author_url": "",
      "post_date": "01/06/2015 20:28:32",
      "content": "<p>I'm trying to get this running on a Macbook. &nbsp;What version of OpenCV is everyone using? &nbsp;I have version 2.4.9 and I'm getting this error:</p>\n\n<p>Undefined symbols for architecture x86_64:<br> &quot;cv::imread(std::string const&amp;, int)&quot;, referenced from:<br> cxxnet::ImageIterator::LoadImage(mshadow::TensorContainer&lt;mshadow::cpu, 3&gt;&amp;, cxxnet::DataInst&amp;, char const*) in cxxnet_data.o<br>ld: symbol(s) not found for architecture x86_64<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>make: *** [bin/cxxnet] Error 1</p>\n\n<p>Any ideas?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62410,
      "author_name": "vkuznet",
      "author_url": "",
      "post_date": "01/07/2015 17:22:19",
      "content": "<p>Hi, when I run the code, it produces the output with train-error values for each round. Can someone explain how they're defined.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62509,
      "author_name": "sneogi",
      "author_url": "",
      "post_date": "01/09/2015 16:23:15",
      "content": "<p>Hello,</p>\n<p>I finally got the code compiled and linked, although a cpu version, because I have no GPU at the moment. I got the training done and&nbsp;found the 45 models in the models directory as expected along with the image means.</p>\n<p><strong>$</strong> ../../bin/cxxnet bowl_48x48.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>.</p>\n<p>[<em>output removed</em>]</p>\n<p>.</p>\n<p>ThreadImagePageIterator:image_list=./train_48x48.lst, bin=./train_48x48.bin<br>cannot find models/image_mean_48x48.bin: create mean image, this will take some time...<br>[ 30000] images processed, 1 sec elapsedsave mean image to models/image_mean_48x48.bin..<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./train_48x48.lst, bin=./train_48x48.bin<br>loading mean image from models/image_mean_48x48.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>round 0:[ 100] 246 sec elapsed[1] train-error:0.797901<br>.</p>\n<p>[<em>output removed</em>]</p>\n<p>.<br>round 44:[ 100] 20950 sec elapsed[45] train-error:0.352688</p>\n<p>updating end, 21135 sec in all</p>\n<p>Next, I invoked the predictor. It continues for a while and then halts with an error&nbsp;<strong>Error:decoding fail</strong>&nbsp;as seen in the trace below. I have the output txt file, where I see 67400 images were processed. Inspecting the code, I found that error message in the file&nbsp;<strong>cxxnet_iter_thread_imbin-inl.hpp</strong>, line 65, function&nbsp;<strong>inline static void LoadImage()</strong>.</p>\n<p><strong>$</strong> ../../bin/cxxnet pred_48x48.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=100<br>ConvolutionLayer: nstep=100<br>ConvolutionLayer: nstep=100<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 100,3,48,48<br>node[1].shape: 100,96,12,12<br>node[2].shape: 100,96,12,12<br>node[3].shape: 100,96,6,6<br>node[4].shape: 100,128,8,8<br>node[5].shape: 100,128,8,8<br>node[6].shape: 100,128,8,8<br>node[7].shape: 100,128,8,8<br>node[8].shape: 100,128,4,4<br>node[9].shape: 1,1,100,2048<br>node[10].shape: 1,1,100,512<br>node[11].shape: 1,1,100,512<br>node[12].shape: 1,1,100,512<br>node[13].shape: 1,1,100,512<br>node[14].shape: 1,1,100,121<br>ThreadImagePageIterator:image_list=./train_48x48.lst, bin=./train_48x48.bin<br>loading mean image from models/image_mean_48x48.bin<br>ThreadBufferIterator: buffer_size=2<br>ThreadImagePageIterator:image_list=./test_48x48.lst, bin=./test_48x48.bin<br>loading mean image from models/image_mean_48x48.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>start predicting...<br><strong>Error:decoding fail</strong></p>\n<p>&nbsp;I am suspecting something went wrong during the conversion and subsequently during loading of the images. Did anyone come across this situation? Any hints?</p>\n<p>Thanks.</p>\n\n<p><strong>Edit: </strong>Tried out again. It works.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62815,
      "author_name": "exored",
      "author_url": "",
      "post_date": "01/17/2015 06:15:31",
      "content": "<p>Hi Mark, Can you give a brief description on how you managed to build on mac? Thank you.</p>\n<p>[quote=Mark Conway;61887]</p>\n<p>Hi Bing:</p>\n<p>Running on Mac Yosemite, got everything built, converted the images, but now getting the following error:</p>\n<p><strong>Error:Assignment: Shape of Tensors in expression is not consistent with target</strong></p>\n<p>localhost:kaggle_bowl$ ../../bin/cxxnet bowl.conf<br>CXXNetTrainer, devCPU=1<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=256<br>ConvolutionLayer: nstep=128<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>SGDUpdater: eta=0.010000, mom=0.900000<br>SGDUpdater: eta=0.020000, mom=0.900000<br>node[0].shape: 256,3,48,48<br>node[1].shape: 256,96,12,12<br>node[2].shape: 256,96,12,12<br>node[3].shape: 256,96,6,6<br>node[4].shape: 256,128,8,8<br>node[5].shape: 256,128,8,8<br>node[6].shape: 256,128,8,8<br>node[7].shape: 256,128,8,8<br>node[8].shape: 256,128,4,4<br>node[9].shape: 1,1,256,2048<br>node[10].shape: 1,1,256,512<br>node[11].shape: 1,1,256,512<br>node[12].shape: 1,1,256,512<br>node[13].shape: 1,1,256,512<br>node[14].shape: 1,1,256,121<br>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>cannot find models/image_mean.bin: create mean image, this will take some time...<br><strong>Error:Assignment: Shape of Tensors in expression is not consistent with target</strong></p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62917,
      "author_name": "ashhafez",
      "author_url": "",
      "post_date": "01/19/2015 23:03:27",
      "content": "<p>Just in case it's of help to anyone is still having&nbsp;the below opencv x86_64 error on Mac with the latest XCode, I managed to get it compiling on mine by re-compiling opencv to use&nbsp;-stdlib=libstdc++ instead of the default&nbsp;-stdlib=libc++, via the shortcut of re-installing it with the following command:</p>\n<p>&quot;brew reinstall opencv --with-cuda&quot;</p>\n<p>(if you do a &quot;brew edit opencv&quot; you'll notice it's turning on&nbsp;-stdlib=libstdc++ when the cuda option is set). you of course need to have the cuda stuff installed as well</p>\n<p>I built cxxnet with blas=1 and had these settings in the Makefile (though perhaps not all are needed, since I was messing around with it for a while)</p>\n<p>LDFLAGS= -lm -lcudart -lcublas -lcurand -lz `pkg-config --libs opencv` `pkg-config --libs openblas` -lblas -L/usr/local/cuda/lib<br> CFLAGS+= -stdlib=libstdc++ -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_CUDA=1 -I/usr/local/Cellar/openblas/0.2.13/include -I/usr/local/cuda/include</p>\n<p>-----</p>\n<p>Undefined symbols for architecture x86_64:<br>&quot;cv::imread(std::string const&amp;, int)&quot;, referenced from:</p>\n<p>-----</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62936,
      "author_name": "griesrt",
      "author_url": "",
      "post_date": "01/20/2015 19:25:41",
      "content": "<p>Wow. &nbsp;Thank you so much Ash. &nbsp;I've been blocked by this error for quite some time.&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63180,
      "author_name": "obaiev",
      "author_url": "",
      "post_date": "01/26/2015 08:02:06",
      "content": "<p>Hi Bing,</p>\n<p>Thank you for sharing the guide.</p>\n<p><br>In the config file you set image shape to (3,48,48). As I can understand &quot;3&quot; is a number of input&nbsp;channels. But images in dataset is in gray-scale and have only one channel. How you convert from 1 to 3 channels? Is it just a copy?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63204,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "01/26/2015 20:21:06",
      "content": "<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[quote=Oleksandr Baiev;63180]</p>\n<p>Hi Bing,</p>\n<p>Thank you for sharing the guide.</p>\n<p><br>In the config file you set image shape to (3,48,48). As I can understand &quot;3&quot; is a number of input&nbsp;channels. But images in dataset is in gray-scale and have only one channel. How you convert from 1 to 3 channels? Is it just a copy?</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63208,
      "author_name": "obaiev",
      "author_url": "",
      "post_date": "01/26/2015 20:40:41",
      "content": "<p>Oh, thank you!</p>\n<p>[quote=Bing Xu;63204]</p>\n<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[quote=Oleksandr Baiev;63180]</p>\n<p>Hi Bing,</p>\n<p>Thank you for sharing the guide.</p>\n<p><br>In the config file you set image shape to (3,48,48). As I can understand &quot;3&quot; is a number of input&nbsp;channels. But images in dataset is in gray-scale and have only one channel. How you convert from 1 to 3 channels? Is it just a copy?</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63220,
      "author_name": "jfkingiii",
      "author_url": "",
      "post_date": "01/26/2015 23:53:40",
      "content": "<p>[quote=Bing Xu;63204]</p>\n<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[/quote]</p>\n<p>I believe libjpeg, which is required for openCV, will decode greyscale images into a single channel. I'm not sure if any additional overhead is introduced by processing three identical channels in the convnet.</p>\n<p>Caffe appears to determine image size by reading the jpeg metadata and it understands greyscale. However I have found cxxnet to be substantially faster than caffe on this problem.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63272,
      "author_name": "mdjawad",
      "author_url": "",
      "post_date": "01/28/2015 12:53:48",
      "content": "<p>[quote=Ertuka;62083]</p>\n<p>Thanks Bing for this eye opening example by running it&nbsp; with GPU Cuda cores.</p>\n<p>As much as I can follow you use one of Linux flavor to utilize GPU and maybe some other people has success on MacOS. I can run your examples on CPU on Ubuntu VM with vmplayer on a Win8.1 host however I wonder whether I can utilize host Nvidia GPU tied to host Win8.1. Is there Anybody managed to run this on Win8.1 OS with GPU? There is a MinGW solution: http://pavel.surmenok.com/2014/05/31/installing-theano-with-gpu-on-windows-64-bit/</p>\n<p>but not yet tried maybe somebody can point a better, like cygwin possibility?</p>\n<p>Thanks</p>\n<p>[/quote]</p>\n<p>Ertuka, Could you let me know the changes you made to the build, I am running on ubuntu using VMware and I am stuck with the build issues.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63287,
      "author_name": "esorar",
      "author_url": "",
      "post_date": "01/29/2015 01:22:34",
      "content": "<p>I used make file under directory make under top dir:</p>\n<p>cd make; make -f Cblas.cpu.mk </p>\n<p>You need add some stuff in it, not remember exactly what but here is the lines from my version</p>\n<p>that you can see what is missing:</p>\n<p>export LDFLAGS= -lcblas -lm -lz -lpthread `pkg-config --libs opencv`</p>\n<p>CFLAGS += -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</p>\n<p>It creates the bin in the same directory.</p>\n<p>I assume you install Cuda developemnt kit by ignoring nvidia driver otherwise next time login your VM will be in a bad state. CPU takes close to 6hours to run all 45 iterations on i7-4710HQ and not uses more than 4GB memory and a single CPU.</p>\n<p>Maybe there is way to make multthreading but I havent looked at it much.</p>\n<p>In terms of running on windows, my attempt for cxxnet was a failure since it uses heavily GNU specific stuff and combined with my weak Visual studio community experience so I couldn't manage to combine nvcc on Visual studio with gnu c++ on mingw nor VC++. On windows my only success was to be able run theano on python and GTX 860M runs a simple large matrix multiplication 24 times faster than on CPU. So I am looking to dual boot my laptop to use GPU on a linux flavor after many years of satisfied user of linux on VMs.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63339,
      "author_name": "telser",
      "author_url": "",
      "post_date": "01/30/2015 02:49:24",
      "content": "<p>Quick question, Bing; is there an easy way to specify to hold out and report error rates on a validation set during training in the conf file? &nbsp;</p>\n\n<p>Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63357,
      "author_name": "mdjawad",
      "author_url": "",
      "post_date": "01/30/2015 13:31:21",
      "content": "<p>[quote=kartal;61442]</p>\n<p>Hi Bing,</p>\n<p>When I run the gen_train.py function I am getting these warnings &quot;convert is not recognized as an internal or external command&quot;. Are you using a special python package to resize images?</p>\n<p>[/quote]</p>\n<p>Install Imagemagick</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63366,
      "author_name": "wolfganggross",
      "author_url": "",
      "post_date": "01/30/2015 14:56:59",
      "content": "<p>Hi</p>\n<p>I got CXXNET installed and it runs on the cpu. But on the gpu (Iuse dev = gpu) after initializing I get:</p>\n<p>initializing end, start working<br>update round 0</p>\n<p>and it stops and jumps back to the shell promt. No error code, nothing. And no training.</p>\n<p>I'm using Ubuntu 14.04 and the NVIDIA Geforce GTX 750 Ti.&nbsp;</p>\n<p>CUDA seems to work and I even get:</p>\n<p>Use CUDA Device 0: GeForce GTX 750 Ti<br>CXXNetTrainer, devCPU=0</p>\n<p>after starting cxxnet.&nbsp;</p>\n<p>Any idea what's the problem?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63368,
      "author_name": "telser",
      "author_url": "",
      "post_date": "01/30/2015 17:04:09",
      "content": "<p>I'm working off a ubuntu 14.04 amazon AWS gpu instance (grid K520), and one of the things I had done prior to trying to work with cxxnet was go through&nbsp;http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/.</p>\n<p>I hadn't tried to use cxxnet before doing the installation, though.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63370,
      "author_name": "akilaw",
      "author_url": "",
      "post_date": "01/30/2015 18:30:59",
      "content": "<p>[quote=Wolf Gang;63366]</p>\n<p>Hi</p>\n<p>I got CXXNET installed and it runs on the cpu. But on the gpu (Iuse dev = gpu) after initializing I get:</p>\n<p>initializing end, start working<br>update round 0</p>\n<p>and it stops and jumps back to the shell promt. No error code, nothing. And no training.</p>\n<p>I'm using Ubuntu 14.04 and the NVIDIA Geforce GTX 750 Ti.&nbsp;</p>\n<p>CUDA seems to work and I even get:</p>\n<p>Use CUDA Device 0: GeForce GTX 750 Ti<br>CXXNetTrainer, devCPU=0</p>\n<p>after starting cxxnet.&nbsp;</p>\n<p>Any idea what's the problem?</p>\n<p>[/quote]</p>\n<p>Check this post by lametta. Doing that fixed the same issue for me&nbsp;https://www.kaggle.com/c/datasciencebowl/forums/t/11279/public-start-guide-of-deep-network-with-a-score-of-1-382285/62236#post62236</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63426,
      "author_name": "mdjawad",
      "author_url": "",
      "post_date": "02/02/2015 03:43:40",
      "content": "<p>[quote=Ertuka;63287]</p>\n<p>I used make file under directory make under top dir:</p>\n<p>cd make; make -f Cblas.cpu.mk</p>\n<p>You need add some stuff in it, not remember exactly what but here is the lines from my version</p>\n<p>that you can see what is missing:</p>\n<p>export LDFLAGS= -lcblas -lm -lz -lpthread `pkg-config --libs opencv`</p>\n<p>CFLAGS += -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</p>\n<p>It creates the bin in the same directory.</p>\n<p>I assume you install Cuda developemnt kit by ignoring nvidia driver otherwise next time login your VM will be in a bad state. CPU takes close to 6hours to run all 45 iterations on i7-4710HQ and not uses more than 4GB memory and a single CPU.</p>\n<p>Maybe there is way to make multthreading but I havent looked at it much.</p>\n<p>In terms of running on windows, my attempt for cxxnet was a failure since it uses heavily GNU specific stuff and combined with my weak Visual studio community experience so I couldn't manage to combine nvcc on Visual studio with gnu c++ on mingw nor VC++. On windows my only success was to be able run theano on python and GTX 860M runs a simple large matrix multiplication 24 times faster than on CPU. So I am looking to dual boot my laptop to use GPU on a linux flavor after many years of satisfied user of linux on VMs.</p>\n<p>[/quote]</p>\n<p>Thank you very much, it helped!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63438,
      "author_name": "graydyn",
      "author_url": "",
      "post_date": "02/02/2015 15:19:43",
      "content": "<p>[quote=Bing Xu;63204]</p>\n<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[/quote]</p>\n<p>Has anybody had any luck getting this to run with 1 channel? &nbsp;I've tried to reduce my channels to 1, and my image manipulation apps all say the image is greyscale, but no matter what CXXNet isn't working for me unless I set the channel dimension to 3.</p>\n<p>I have this feeling like my image apps are lying to me, and that my JPGs really are still 3 channels. Not sure what to use to legitimately make a one channel image though.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63440,
      "author_name": "jfkingiii",
      "author_url": "",
      "post_date": "02/02/2015 15:46:07",
      "content": "<p>They are 1 channel, per Bing's note cxxnet converts them to 3 channel no matter what.</p>\n<p>Getting cxxnet to handle single channel input without replicating the data three times would be a good enhancement.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63491,
      "author_name": "yetiman",
      "author_url": "",
      "post_date": "02/03/2015 18:20:35",
      "content": "<p>I haven't been following this thread, but thought it might be a good way to learn something about cxxnet to see how it compares with similar tools.</p>\n<p>Didn't have much trouble building it (on Linux Mint 17), although I did have to monkey with the make file and the source code slightly (nothing that hasn't been covered in this forum already).&nbsp; Once it was built I managed to run the MNIST example/tutorial successfully (with and without GPU acceleration).&nbsp; Very nice!&nbsp; Compares very favorably to other CNN implementations as far as speed is concerned!</p>\n<p>First I have a simple question: The MNIST config file has &quot;pad = 1&quot; for the first conv layer, but the cxxnet &quot;Layers&quot; documentation doesn't mention a &quot;pad&quot; option.&nbsp; What is it for?</p>\n<p>And a comment/suggestion:&nbsp; It would be nice to have the ability to specify a hold-out or validation set in the config file (that either isn't part of the training data, or is a random N% of the training data) against which the model is tested after each training epoch, using the selected metric, rather than (or in addition to) evaluation vs. the training data.&nbsp; Would help with cross-validation and finding &quot;early stopping&quot; criteria.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63492,
      "author_name": "yetiman",
      "author_url": "",
      "post_date": "02/03/2015 19:04:55",
      "content": "<p>Never mind my padding question above.&nbsp; I looked at the code and it appears to mean exactly the same thing as it does in Caffe.&nbsp; That was my assumption, but lacking documentation I wasn't sure.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63619,
      "author_name": "telser",
      "author_url": "",
      "post_date": "02/04/2015 22:33:46",
      "content": "<p>If we're adding feature requests, I would note that it seems strange to have both a training config file and prediction config file,given the substantial overlap in parameters between the two.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63632,
      "author_name": "spintronic",
      "author_url": "",
      "post_date": "02/05/2015 07:46:13",
      "content": "",
      "votes": null,
      "replies": []
    },
    {
      "id": 63669,
      "author_name": "wanji28918",
      "author_url": "",
      "post_date": "02/06/2015 00:49:09",
      "content": "<p>You can decode with `CV_LOAD_IMAGE_GRAYSCALE` or `CV_LOAD_IMAGE_UNCHANGED` parameter, that will give you a single channel image :)</p>\n<p>[quote=Bing Xu;63204]</p>\n<p>I use opencv to decode, opencv's output for jpg is 3 channel, and all are same.</p>\n<p>[quote=Oleksandr Baiev;63180]</p>\n<p>Hi Bing,</p>\n<p>Thank you for sharing the guide.</p>\n<p><br>In the config file you set image shape to (3,48,48). As I can understand &quot;3&quot; is a number of input&nbsp;channels. But images in dataset is in gray-scale and have only one channel. How you convert from 1 to 3 channels? Is it just a copy?</p>\n<p>[/quote]</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63758,
      "author_name": "superfan123",
      "author_url": "",
      "post_date": "02/07/2015 22:16:35",
      "content": "<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63760,
      "author_name": "songgc",
      "author_url": "",
      "post_date": "02/07/2015 22:58:24",
      "content": "<p>[quote=superfan123;63758]</p>\n<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>\n<p>[/quote]</p>\n<p>The root cause is that CUDA 6.5 doesn't support gcc 4.9 or up. gcc 4.8 should be good.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63761,
      "author_name": "esorar",
      "author_url": "",
      "post_date": "02/07/2015 23:13:11",
      "content": "<p>Just modify CUDA config.h file to accept 4.9 since CUDA 6.5 contraints gcc to 4.8 and lower.</p>\n<p>I have used gcc 4.9 on F21 with CUDA 6.5 and not seen any issue so far.</p>\n<p>[quote=superfan123;63758]</p>\n<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63762,
      "author_name": "superfan123",
      "author_url": "",
      "post_date": "02/07/2015 23:15:14",
      "content": "<p>[quote=Guocong Song;63760]</p>\n<p>[quote=superfan123;63758]</p>\n<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>\n<p>[/quote]</p>\n<p>The root cause is that CUDA 6.5 doesn't support gcc 4.9 or up. gcc 4.8 should be good.</p>\n<p>[/quote]</p>\n<p>Your are right. I changed gcc link file in ~/CUDA-6.5/bin and make it point to gcc++-4.8 but that didn't fix the problem,&nbsp;</p>\n<p>Anything else I should change?</p>\n<p>I have gcc4.9 and 4.8 installed on Ubuntu 14.04.</p>\n<p>Thanks a lot.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63764,
      "author_name": "superfan123",
      "author_url": "",
      "post_date": "02/07/2015 23:26:59",
      "content": "<p>[quote=Ertuka;63761]</p>\n<p>Just modify CUDA config.h file to accept 4.9 since CUDA 6.5 contraints gcc to 4.8 and lower.</p>\n<p>I have used gcc 4.9 on F21 with CUDA 6.5 and not seen any issue so far.</p>\n<p>[quote=superfan123;63758]</p>\n<p>After add path to header and lib files , I run &quot;sh build.sh&quot; and get a error message --&nbsp;</p>\n<p>#error -- unsupported GNU version! gcc 4.9 and up are not supported!</p>\n<p>Is there an easy way to get round this error?</p>\n<p>Thanks.</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>Thanks Ertuka, Could you show me a sample statement&nbsp;to modify config.h?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63765,
      "author_name": "superfan123",
      "author_url": "",
      "post_date": "02/07/2015 23:34:03",
      "content": "<p>Thanks guys, Now it's working :)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63766,
      "author_name": "superfan123",
      "author_url": "",
      "post_date": "02/08/2015 00:31:23",
      "content": "<p>Now after add those header and lib --</p>\n<p>-I/usr/local/cuda-6.5/include</p>\n<p>-I/opt/intel/mkl/include</p>\n<p>-I/opt/intel/composer_xe_2015.2.164/mkl/include</p>\n<p>-L/opt/intel/mkl/lib/intel64</p>\n<p>-L/opt/intel/composer_xe_2015.2.164/compiler/lib/intel64</p>\n<p>-L/usr/local/cuda-6.5/lib64</p>\n\n<p>I got lots of errors like --</p>\n<p>/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `mkl_spblas_ccoo0nhuuc__mmout_par'</p>\n<p>/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `mkl_lapack_ps_dsymv_nb'<br>/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_chesvxx'<br>/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_ssygst'</p>\n\n<p>I guess some header file is missing...</p>\n<p>Appreciate your help!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63767,
      "author_name": "esorar",
      "author_url": "",
      "post_date": "02/08/2015 00:41:08",
      "content": "<p>Looks like you don't have mkl, so build it as</p>\n<p>build.sh blas=1</p>\n<p>and install blas libs possibly atlas-devel.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63768,
      "author_name": "superfan123",
      "author_url": "",
      "post_date": "02/08/2015 00:52:59",
      "content": "<p>I installed intel MKL composer package and I also include MKL header and lib. Maybe something else still missing.</p>\n<p>Thanks</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63770,
      "author_name": "charlesroberson",
      "author_url": "",
      "post_date": "02/08/2015 04:46:04",
      "content": "<p>It was going well. I built cxxnet with a small change to the Makefile. I tested on CPU with MNIST and it worked. It took some trial and error to get the original data location correct: I put in in cxxnet/example/kaggle_bowl/bowl/data and the new images (48x48) are in cxxnet/example/kaggle_bowl/data. (the difference is the extra bowl dir).</p>\n<p>The problem is in generating the image lists:</p>\n<p>&nbsp; &nbsp;python gen_img_list.py train cxxnet/example/kaggle_bowl/bowl/sampleSubmission.csv data/train train.lst&nbsp;</p>\n<p>&nbsp;it immediately gives the error no such file. When I touch a file of that name there to create an empty file, it stops due to nothing in the file.</p>\n<p>&nbsp; Did I get the data locations correct?&nbsp;</p>\n<p>&nbsp; How do you create sampleSubmission.csv? Am I putting it in the correct place?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63774,
      "author_name": "nikeshbajaj",
      "author_url": "",
      "post_date": "02/08/2015 11:45:15",
      "content": "<p>Does this tutorial giving score =1.3 for everybody, It is not working for me, I had score 4.7 by this tutorial. I am doing something wrong?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63775,
      "author_name": "superfan123",
      "author_url": "",
      "post_date": "02/08/2015 13:21:55",
      "content": "<p>@Bing Xu,Thank you for this great tutorial!</p>\n<p>I got 1.42 on LB after a sleepless night. Totally worth it.</p>\n<p>I have a GTX610 with 48 cuda core and it takes 2 hour for modeling step. Plan to upgrade to a GPU and try it again. I need to sell one kidney to buy a K80. ;)</p>\n<p>Still need to figure out MKL part. :-\\</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63789,
      "author_name": "telser",
      "author_url": "",
      "post_date": "02/09/2015 01:40:28",
      "content": "<p>[quote=Charles Roberson;63770]</p>\n<p>It was going well. I built cxxnet with a small change to the Makefile. I tested on CPU with MNIST and it worked. It took some trial and error to get the original data location correct: I put in in cxxnet/example/kaggle_bowl/bowl/data and the new images (48x48) are in cxxnet/example/kaggle_bowl/data. (the difference is the extra bowl dir).</p>\n<p>The problem is in generating the image lists:</p>\n<p>&nbsp; &nbsp;python gen_img_list.py train cxxnet/example/kaggle_bowl/bowl/sampleSubmission.csv data/train train.lst&nbsp;</p>\n<p>&nbsp;it immediately gives the error no such file. When I touch a file of that name there to create an empty file, it stops due to nothing in the file.</p>\n<p>&nbsp; Did I get the data locations correct?&nbsp;</p>\n<p>&nbsp; How do you create sampleSubmission.csv? Am I putting it in the correct place?</p>\n<p>[/quote]</p>\n<p>sampleSubmission.csv is made available by Kaggle on the data page. You point the command at wherever you store that.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63905,
      "author_name": "hasselmann",
      "author_url": "",
      "post_date": "02/10/2015 09:49:59",
      "content": "<p>Thanks Bing for the excellent script, I am trying to learn a bit about the CNNs that way.</p>\n<p>I could get cxxnet running on cpu and without mkl and got through the example with the&nbsp;48x48 resized pictures and got a score around 1.39 (after 10 hrs..). Then I tried instead of resizing with imagemagick (as in the example) to use a python script to generate 48x48 sized train files via cropping and finally stored the files using cv2.imwrite.</p>\n<p>I have the same number of train images with the same 48x48 size as in the example, but generated in a different way. Now, the cxxnet file doesnt seem to learn anymore, here is a sample output what I get from cxxnet:</p>\n<p>...</p>\n<p>ThreadImagePageIterator:image_list=./train.lst, bin=./train.bin<br>loading mean image from models/image_mean.bin<br>ThreadBufferIterator: buffer_size=2<br>initializing end, start working<br>round 0:[ 100] 467 sec elapsed[1] train-error:0.936077<br>round 1:[ 100] 1241 sec elapsed[2] train-error:0.936077<br>round 2:[ 100] 2014 sec elapsed[3] train-error:0.934785<br>round 3:[ 100] 2783 sec elapsed[4] train-error:0.936077<br>round 4:[ 100] 3566 sec elapsed[5] train-error:0.936077<br>round 5:[ 100] 4377 sec elapsed[6] train-error:0.934785<br>round 6:[ 100] 5122 sec elapsed[7] train-error:0.936077<br>...</p>\n<p>Its similar to the problem description I found here:</p>\n<p>https://github.com/antinucleon/cxxnet/issues/28</p>\n<p>Is there something wrong in the way I generate the jpgs? Or should I adjust<br>&nbsp;some parameters in bowl.conf to achieve convergence? Right now I didnt touch bowl.conf,<br>&nbsp;its exactly as in the example.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63973,
      "author_name": "asaini",
      "author_url": "",
      "post_date": "02/10/2015 21:39:19",
      "content": "<p>@nils:</p>\n<p>Did you regenerate the mean image file using the new set of training images that you created?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63978,
      "author_name": "charlesroberson",
      "author_url": "",
      "post_date": "02/10/2015 23:10:30",
      "content": "<p>@Torgos, Thanks for the info. Of course that fixed it. I had more issues but fixed them myself and got it all working.</p>\n<p>@Bing, Thanks for the work and sharing.</p>\n<p>This next suggestion can help EVERYBODY.</p>\n<p>@All in CNN, The submission files are 4x to 7x bigger than the ones I used for my RF model submissions. Looking at the submission file, I see why. There are many entries with values below 0.0001 which look like 6.nnnnne-07.</p>\n<p>&nbsp; If all numbers less than 0.0001 (1% of 1%) were set to 0, that would significantly cut the data size: likely by 5x or better. This will translate into much smaller zip files as well. My current CNN submission zip files are 70 MB while my RF submission zip files are around 10MB to 15MB.</p>\n<p>&nbsp; &nbsp;I'd do this myself, but I don't know Python and it looks like line 29 in the make_submission.py file needs changing.</p>\n<p>&nbsp; I think doing this will help everybody and kaggle.com due to a reduction in bandwidth. Things are just going to heat up more in the next 34 days! Also, there are some other contests ending near the same day as this one.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64133,
      "author_name": "ajulian",
      "author_url": "",
      "post_date": "02/12/2015 18:15:57",
      "content": "<p>Hi all,</p>\n<p>I'm new to this forum (and not a data science expert either). First of all, I want to thank Bing Xu &amp; Tianqi Chen for this nice cxxnet thing. It took me several unsuccessful days to compile opencv on my old 2009 Macbook (with Mavericks) until I realized I could use homebrew; the cxxnet path has been (quite) smooth since then; I am now where many of you were 40-50 days ago: score of 1.39, thinking on input augmentation...</p>\n<p>My problem is that my GPU has not enough memory (just 256MB) to run cxxnet with the given bowl.conf, and it took 10 hours to run 45 rounds in CPU mode.</p>\n<p>Is there something I can try to run cxxnet in my GPU? I have reduced the resize parameters from 48*48 to 30*30, but still no luck. (BTW, I know GPU+CUDA works properly because the MNIST tutorial runs on it)</p>\n<p>Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64134,
      "author_name": "paweljankiewicz",
      "author_url": "",
      "post_date": "02/12/2015 18:21:48",
      "content": "<p>Try reducing the batch size. Either way I recommend getting ec2 g2large instance. Spot requests are $0.10 per hour.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64135,
      "author_name": "ajulian",
      "author_url": "",
      "post_date": "02/12/2015 18:31:11",
      "content": "<p>Thanks for your fast answer. I took a look to aws and google cloud but I did not understand how to proceed for this specific need: do you upload the code as-is to a virtual machine? or do you have to adapt the code to a virtual array of GPUs?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64136,
      "author_name": "paweljankiewicz",
      "author_url": "",
      "post_date": "02/12/2015 18:37:45",
      "content": "<p>You gain access to your own instance. You can log and do everything with it through ssh.</p>\n<p><span style=\"line-height: 1.4\">What I did was</span></p>\n<p>1. Create instance (ubuntu)</p>\n<p>2. Attach ebs storage to it for persistant data</p>\n<p>3. install everything : libraries, cuda. Save the image (ami) of the instance (it can be terminated any time so you need to make sure you can start it up again fast).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64156,
      "author_name": "akilaw",
      "author_url": "",
      "post_date": "02/13/2015 05:39:22",
      "content": "<p>You can follow this blog or use the AMI they mentioned</p>\n<p>http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/</p>\n<p>Use spot instances. GPU spot instance cost is around 0.064</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64195,
      "author_name": "hasselmann",
      "author_url": "",
      "post_date": "02/13/2015 21:59:15",
      "content": "<p>[quote=zeros_benchmark;63973]</p>\n<p>@nils:</p>\n<p>Did you regenerate the mean image file using the new set of training images that you created?</p>\n<p>[/quote]</p>\n<p>I deleted all the files in the models folder so I assume the mean image was newly generated. I now also got cxxnet working on my image set-I simply did a clean compilation and generated all the cropped images again. I still dont know what went wrong before but it works now, thanks!</p>\n<p>Another thing, is it possible to view the filter banks within cxxnet? Is there some simple way to extract and visualize them from the models files? </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65089,
      "author_name": "jiweiliu",
      "author_url": "",
      "post_date": "02/28/2015 01:58:09",
      "content": "<p>When I try to use the code in cv,&nbsp;the prediction file&nbsp;sometimes lost some samples.&nbsp;</p>\n<p>Say the test.lst have 10200 samples, which is correct, but test.txt only contains 10000 samples. How to deal with it?</p>\n<p>Sorry I didn't go through every page of this post. maybe my question is answered somewhere.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65090,
      "author_name": "telser",
      "author_url": "",
      "post_date": "02/28/2015 02:05:15",
      "content": "<p>Change the batch size; cxxnet only predicts multiples of it.</p>\n\n<p>https://github.com/antinucleon/cxxnet/issues/17</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65091,
      "author_name": "jiweiliu",
      "author_url": "",
      "post_date": "02/28/2015 02:11:30",
      "content": "<p>[quote=Torgos;65090]</p>\n<p>Change the batch size; cxxnet only predicts multiples of it.</p>\n<p>https://github.com/antinucleon/cxxnet/issues/17</p>\n<p>[/quote]</p>\n<p>I see. Thank you very much!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65092,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "02/28/2015 02:16:13",
      "content": "<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n\n<p>[quote=rcarson;65089]</p>\n<p>When I try to use the code in cv,&nbsp;the prediction file&nbsp;sometimes lost some samples.&nbsp;</p>\n<p>Say the test.lst have 10200 samples, which is correct, but test.txt only contains 10000 samples. How to deal with it?</p>\n<p>Sorry I didn't go through every page of this post. maybe my question is answered somewhere.</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65098,
      "author_name": "maineiac",
      "author_url": "",
      "post_date": "02/28/2015 03:00:19",
      "content": "<p>[quote=Bing Xu;65092]</p>\n<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n<p>[/quote]</p>\n\n<p>That's awesome! I'm on the edge of my seat :)</p>\n<p>What sort of real time augmentation are you going to include?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65112,
      "author_name": "shankarmsy",
      "author_url": "",
      "post_date": "02/28/2015 06:17:12",
      "content": "<p>[quote=Bing Xu;65092]</p>\n<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n<p>[quote=rcarson;65089]</p>\n<p>When I try to use the code in cv,&nbsp;the prediction file&nbsp;sometimes lost some samples.&nbsp;</p>\n<p>Say the test.lst have 10200 samples, which is correct, but test.txt only contains 10000 samples. How to deal with it?</p>\n<p>Sorry I didn't go through every page of this post. maybe my question is answered somewhere.</p>\n<p>[/quote]</p>\n<p>[/quote]</p>\n<p>That's terrific Bing. You got all the missing pieces covered with those updates.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65211,
      "author_name": "mconway",
      "author_url": "",
      "post_date": "03/02/2015 02:55:28",
      "content": "",
      "votes": null,
      "replies": []
    },
    {
      "id": 65212,
      "author_name": "mconway",
      "author_url": "",
      "post_date": "03/02/2015 02:56:37",
      "content": "<p>[quote=Robert Griesmeyer;62324]</p>\n<p>Did anyone get it running on the Macbook on OSX? &nbsp;</p>\n<p>[/quote]</p>\n<p>Yes, use Blas and the following attached files for generating cxxnet and your images. Otherwise, you will get a mismatch in the shape of tensors. Total running time for training on a MacAir (CPU only) was ~5 hours with prediction time of about 15 minutes.</p>\n<p>Regards,</p>\n<p>Mark</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65401,
      "author_name": "dopelearner",
      "author_url": "",
      "post_date": "03/04/2015 11:47:27",
      "content": "<p>get the following error when running ./build.sh.<br>cxxnet/io/cxxnet_data.cpp:6:28: error: mshadow/tensor.h: No such file or directory<br>In file included from cxxnet/io/cxxnet_data.cpp:18:<br>cxxnet/io/cxxnet_iter_cifar-inl.hpp:5:38: error: mshadow/tensor_container.h: No such file or directory<br>In file included from cxxnet/io/cxxnet_data.cpp:21:<br>cxxnet/io/cxxnet_iter_img-inl.hpp:14:30: error: opencv2/opencv.hpp: No such file or directory</p>\n<p><br>&nbsp;</p>\n<p>This means that the header files are not being included correctly. I have modified the Makefile with -I option to include all the headers. Does anybody have any idea why this is happening?</p>\n<p>I have already cloned mshadow and can see the header files in the directory but they are not being included for some reason.</p>\n<p>Please find attached my Makefile and error log.Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65402,
      "author_name": "dopelearner",
      "author_url": "",
      "post_date": "03/04/2015 11:50:43",
      "content": "<p>^ Oops, The last Makefile(1.57 KB) is the correct one. Ignore the first one.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65559,
      "author_name": "",
      "author_url": "",
      "post_date": "03/06/2015 02:17:26",
      "content": "<p>Hi Bing, thanx a lot for sharing! In the sample config file (bowl.conf), some conv layers don't have a stride value. So I'm wondering what the default stride is.&nbsp;</p>\n<p>Please advise. Many thanx in advance!</p>\n\n<p>JJ</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65627,
      "author_name": "telser",
      "author_url": "",
      "post_date": "03/06/2015 19:53:08",
      "content": "<p>[quote=Bing Xu;65092]</p>\n<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n<p>[/quote]</p>\n<p>Looking forward to it for the diabetes competition; I don't suppose you're including a quick option in the config file to split (and report on) a % of data off for validation?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65631,
      "author_name": "binghsu",
      "author_url": "",
      "post_date": "03/06/2015 20:01:30",
      "content": "<p>There is many ways to do it and we don't think it is an important feature to hard code.</p>\n<p>Solution in V2:</p>\n<p>1. sed -n '1, 20000p' train.lst &gt; tr.lst</p>\n<p>&nbsp; &nbsp; sed -n '20000, 30337p' train.lst &gt; va.lst</p>\n<p>Then generate bin according to it.</p>\n<p>2. Use script in tools to split list file in to parts, like 6 separate bin files. Then set in configuration file which bins you want to use to train and which bins you want to treat as eval</p>\n\n<p>3. Use python interface, do slice by numpy&nbsp;</p>\n<p>[quote=Torgos;65627]</p>\n<p>[quote=Bing Xu;65092]</p>\n<p>We will release v0.2 of CXXNET. It will fully fix this problem. And new version will support real time augmentation, multi-GPU training and distributed training. Stay tuned!</p>\n<p>[/quote]</p>\n<p>Looking forward to it for the diabetes competition; I don't suppose you're including a quick option in the config file to split (and report on) a % of data off for validation?</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65677,
      "author_name": "dopelearner",
      "author_url": "",
      "post_date": "03/07/2015 11:54:39",
      "content": "<p>I was able to get all the header files included but running ./build.sh is throwing errors like:</p>\n<p>cxxnet/io/cxxnet_data.cpp:12: error: &#8216;real_t&#8217; in namespace &#8216;mshadow&#8217; does not name a type</p>\n<p>cxxnet/io/cxxnet_iter_cifar-inl.hpp:14: error: &#8216;struct mshadow::Tensor&lt;mshadow::cpu, 4, float&gt;&#8217; has no member named &#8216;dptr&#8217;</p>\n<p>cxxnet/io/cxxnet_iter_cifar-inl.hpp:42: error: &#8216;struct mshadow::Tensor&lt;mshadow::cpu, 4, float&gt;&#8217; has no member named &#8216;shape&#8217;</p>\n<p>Please find my Makefile attached. I have added all of the header file directories for OpenCV with the -I flag to CFLAGS because I had installed OpenCV in a custom location (no root access :/ ).</p>\n<p><br>The full error log is present in whatever.log</p>\n<p>@Bing, can you take a quick look at this? Btw, thanks for writing CXXNET :)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65684,
      "author_name": "mconway",
      "author_url": "",
      "post_date": "03/07/2015 15:45:38",
      "content": "<p>[quote=Saurav Gupta;65677]</p>\n<p>I was able to get all the header files included but running ./build.sh is throwing errors like:</p>\n<p>cxxnet/io/cxxnet_data.cpp:12: error: &#8216;real_t&#8217; in namespace &#8216;mshadow&#8217; does not name a type</p>\n<p>cxxnet/io/cxxnet_iter_cifar-inl.hpp:14: error: &#8216;struct mshadow::Tensor&lt;mshadow::cpu, 4, float&gt;&#8217; has no member named &#8216;dptr&#8217;</p>\n<p>cxxnet/io/cxxnet_iter_cifar-inl.hpp:42: error: &#8216;struct mshadow::Tensor&lt;mshadow::cpu, 4, float&gt;&#8217; has no member named &#8216;shape&#8217;</p>\n<p>Please find my Makefile attached. I have added all of the header file directories for OpenCV with the -I flag to CFLAGS because I had installed OpenCV in a custom location (no root access :/ ).</p>\n<p><br>The full error log is present in whatever.log</p>\n<p>@Bing, can you take a quick look at this? Btw, thanks for writing CXXNET :)</p>\n<p>[/quote]</p>\n<p>You may be using the newer version of the mshadow code (2.x). You have to point to the older version (1.x).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65771,
      "author_name": "alexeygolyshev",
      "author_url": "",
      "post_date": "03/09/2015 11:39:08",
      "content": "<p>deleted</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "60426": "",
    "60429": "",
    "60431": "",
    "60439": "",
    "60440": "",
    "60441": "",
    "60464": "",
    "60483": "",
    "60499": "",
    "60503": "",
    "61418": "",
    "61419": "",
    "61420": "",
    "61421": "",
    "61423": "",
    "61426": "",
    "61427": "",
    "61428": "",
    "61432": "",
    "61433": "",
    "61436": "",
    "61437": "",
    "61438": "",
    "61442": "",
    "61443": "",
    "61446": "",
    "61447": "",
    "61471": "",
    "61497": "",
    "61503": "",
    "61522": "",
    "61523": "",
    "61528": "",
    "61575": "",
    "61581": "",
    "61597": "",
    "61598": "",
    "61599": "",
    "61600": "",
    "61601": "",
    "61632": "",
    "61633": "",
    "61726": "",
    "61732": "",
    "61733": "",
    "61783": "",
    "61786": "",
    "61792": "",
    "61793": "",
    "61828": "",
    "61830": "",
    "61848": "",
    "61849": "",
    "61887": "",
    "61917": "",
    "61919": "",
    "61929": "",
    "61934": "",
    "62072": "",
    "62073": "",
    "62083": "",
    "62150": "",
    "62194": "",
    "62204": "",
    "62214": "",
    "62236": "",
    "62285": "",
    "62286": "",
    "62302": "",
    "62324": "",
    "62328": "",
    "62332": "",
    "62334": "",
    "62346": "",
    "62347": "",
    "62378": "",
    "62410": "",
    "62509": "",
    "62815": "",
    "62917": "",
    "62936": "",
    "63180": "",
    "63204": "",
    "63208": "",
    "63220": "",
    "63272": "",
    "63287": "",
    "63339": "",
    "63357": "",
    "63366": "",
    "63368": "",
    "63370": "",
    "63426": "",
    "63438": "",
    "63440": "",
    "63491": "",
    "63492": "",
    "63619": "",
    "63632": "",
    "63669": "",
    "63758": "",
    "63760": "",
    "63761": "",
    "63762": "",
    "63764": "",
    "63765": "",
    "63766": "",
    "63767": "",
    "63768": "",
    "63770": "",
    "63774": "",
    "63775": "",
    "63789": "",
    "63905": "",
    "63973": "",
    "63978": "",
    "64133": "",
    "64134": "",
    "64135": "",
    "64136": "",
    "64156": "",
    "64195": "",
    "65089": "",
    "65090": "",
    "65091": "",
    "65092": "",
    "65098": "",
    "65112": "",
    "65211": "",
    "65212": "",
    "65401": "",
    "65402": "",
    "65559": "",
    "65627": "",
    "65631": "",
    "65677": "",
    "65684": "",
    "65771": ""
  },
  "source": "meta"
}