xingdi-eric-yuan / multi-layer-convnet

A multi-layer convnet
28 stars 23 forks source link

Subscript Out of Range(trainx and testx are zero) #1

Open apassenger opened 7 years ago

apassenger commented 7 years ago

Hello Eric Yuan First of all thank you very much for this wonderful work I want to compile this code but I have a problem My error is the following link

http://i.resimyukle.xyz/UByL.png

What I mean is that trainx and testx are always empty so

`cout << "Read trainX successfully, including " << trainX[0].cols * trainX[0].rows << " features and " << trainX.size() << " samples." << endl;
    cout << "Read testX successfully, including " << testX[0].cols * testX[0].rows << " features and " << testX.size() << " samples." << endl;`

on the other hand trainy and testy are normal(not empty) But I cant solve this problem Could you help me please??

xingdi-eric-yuan commented 7 years ago

Hi @apassenger

have you tried comment these lines: https://github.com/xingdi-eric-yuan/multi-layer-convnet/blob/master/src/read_data.cc#L23-L24 if same error appears (which means it has nothing to do with preproc and enlarge), can you test this function: https://github.com/xingdi-eric-yuan/multi-layer-convnet/blob/master/src/read_data.cc#L35

I have a feeling that might be the image files, i.e. "mnist/train-images-idx3-ubyte" are not correctly placed?

apassenger commented 7 years ago

Hi @xingdi-eric-yuan

Thank you for your reply You are right

I have a feeling that might be the image files, i.e. "mnist/train-images-idx3-ubyte" are not correctly placed?

I forgat "..//mnist" But I want to ask some questions 1) Compiling is too long time is it normal?for instance I have not compile yet for 20 min 2)when finished compiling what is waiting for me? 3) Is this code use for 3d images? If I want use 3d images what I should do? (4) actually this error other computer and I have forgatten now but tomorrow can I ask?

xingdi-eric-yuan commented 7 years ago

@apassenger

  1. I haven't been using this code for ~2 years, so I'm actually not sure about the compile/run time now.
  2. what do you mean by 3d images, like 3-channel (e.g. rgb) images or like images captured from a depth camera like kinect? For 3-channel images maybe you can check another repo: https://github.com/xingdi-eric-yuan/conv-net-version-3 which I used to do classify on cifar-10 dataset, which is a 3-channel image. And for images with depth info, I'd say this network implementation can not deal with that directly, unless you do some process and make it exactly the same format (gray scale image) as the data we use here. 3(4) sure.
apassenger commented 7 years ago

@xingdi-eric-yuan 2)like this http://www.cvlibs.net/datasets/kitti/eval_object_detail.php?result=4d66469485ba4da12f529cf7cd61972221136caa and https://arxiv.org/pdf/1609.06666v1.pdf 3)Thank you very much

xingdi-eric-yuan commented 7 years ago

@apassenger OK, seems like 3d point cloud, then I don't think any of my implementations will fit, try to use some frameworks like theano/tensorflow, they deal with multi-dimensional convolution much easier.

apassenger commented 7 years ago

theano is for c++ (I am studying c++ and opencv) ?I think it is for phyton I tried compile yyr code in devc++ no error but I cant see result for 5 hours Is it normal? and after finished compile what I will see ? I am researching 3d point cloud and convolutional neural networks but I think convolutionalneural network is not different only I should do 3d point cloud part Is it true If is not true how will change convlutional neural network ?

xingdi-eric-yuan commented 7 years ago

Yes Theano is for python. There's a new framework by CMU called DyNet, which looks amazing, and there're c++ APIs, check THIS The extremely long compile time doesn't seem normal, but I'm not sure what happened in your end. So for the 3d point cloud stuff, I don't think it's a good way to squeeze the data into 2d data, as long as you want to make the conv kernels 3d (or even high dimension), then my implementation doesn't fit, it's designed to be training on "mnist" style data.

apassenger commented 7 years ago

Thank you, For 3d point cloud training and network How can I use function( how many layer .. ?) Can I use a training or network (oridnary function) or becouse of d point cloud I should use >3 I m soory for my questions (ı am new in this topic and this is my homework so ı alwasy asking)