faustomilletari / VNet

GNU General Public License v3.0
287 stars 122 forks source link

Error #7

Closed toki2015 closed 7 years ago

toki2015 commented 7 years ago

I met a problem when training vnet by using the same dataset you used. Could you give me some comments ? By the way, PYTHONPATH=/home/user/BVLC/vnet/3D-Caffe/python/

(BVLC) user@DeepBox:~/BVLC/vnet/VNet$ python main.py -train /home/user/BVLC/vnet/VNet/Dataset/Train FILE LIST: ['Case08.mhd', 'Case21.mhd', 'Case17.mhd', 'Case01.mhd', 'Case05.mhd', 'Case03.mhd', 'Case10.mhd', 'Case18.mhd', 'Case09.mhd', 'Case25.mhd', 'Case23.mhd', 'Case16.mhd', 'Case24.mhd', 'Case04.mhd', 'Case06.mhd', 'Case07.mhd', 'Case12.mhd', 'Case14.mhd', 'Case15.mhd', 'Case00.mhd', 'Case11.mhd', 'Case13.mhd', 'Case19.mhd', 'Case02.mhd', 'Case20.mhd', 'Case22.mhd'] The dataset has shape: data - 26. labels - 26 WARNING: Logging before InitGoogleLogging() is written to STDERR I1205 11:24:14.928871 12831 solver.cpp:48] Initializing solver from parameters: base_lr: 0.0001 display: 1 lr_policy: "step" gamma: 0.1 momentum: 0.99 weight_decay: 0.0005 stepsize: 20000 snapshot: 500 snapshot_prefix: "/home/user/BVLC/vnet/VNet/Models/MRI_cinque_snapshots/" net: "/home/user/BVLC/vnet/VNet/Prototxt/train_noPooling_ResNet_cinque.prototxt" I1205 11:24:14.928997 12831 solver.cpp:91] Creating training net from net file: /home/user/BVLC/vnet/VNet/Prototxt/train_noPooling_ResNet_cinque.prototxt I1205 11:24:14.929697 12831 upgrade_proto.cpp:66] Attempting to upgrade input file specified using deprecated input fields: /home/user/BVLC/vnet/VNet/Prototxt/train_noPooling_ResNet_cinque.prototxt I1205 11:24:14.929725 12831 upgrade_proto.cpp:69] Successfully upgraded file specified using deprecated input fields. W1205 11:24:14.929733 12831 upgrade_proto.cpp:71] Note that future Caffe releases will only support input layers and not input fields. I1205 11:24:14.930472 12831 net.cpp:52] Initializing net from parameters: state { phase: TRAIN } ....

I1205 10:59:36.132380 4606 layer_factory.hpp:77] Creating layer input I1205 10:59:36.132422 4606 net.cpp:94] Creating Layer input I1205 10:59:36.132436 4606 net.cpp:409] input -> data I1205 10:59:36.132464 4606 net.cpp:409] input -> label I1205 10:59:36.134156 4606 net.cpp:144] Setting up input I1205 10:59:36.134178 4606 net.cpp:151] Top shape: 2 1 128 128 64 (2097152) I1205 10:59:36.134188 4606 net.cpp:151] Top shape: 2 1 128 128 64 (2097152) I1205 10:59:36.134196 4606 net.cpp:159] Memory required for data: 16777216 I1205 10:59:36.134203 4606 layer_factory.hpp:77] Creating layer data_input_0_split I1205 10:59:36.134217 4606 net.cpp:94] Creating Layer data_input_0_split I1205 10:59:36.134225 4606 net.cpp:435] data_input_0_split <- data I1205 10:59:36.134238 4606 net.cpp:409] data_input_0_split -> data_input_0_split_0 I1205 10:59:36.134251 4606 net.cpp:409] data_input_0_split -> data_input_0_split_1 I1205 10:59:36.134296 4606 net.cpp:144] Setting up data_input_0_split I1205 10:59:36.134310 4606 net.cpp:151] Top shape: 2 1 128 128 64 (2097152) I1205 10:59:36.134320 4606 net.cpp:151] Top shape: 2 1 128 128 64 (2097152) I1205 10:59:36.134325 4606 net.cpp:159] Memory required for data: 33554432 I1205 10:59:36.134332 4606 layer_factory.hpp:77] Creating layer conv_in128_chan16 I1205 10:59:36.134352 4606 net.cpp:94] Creating Layer conv_in128_chan16 I1205 10:59:36.134361 4606 net.cpp:435] conv_in128_chan16 <- data_input_0_split_0 I1205 10:59:36.134373 4606 net.cpp:409] conv_in128_chan16 -> conv_in128_chan16 F1205 10:59:36.134531 4606 blob.hpp:140] Check failed: num_axes() <= 4 (5 vs. 4) Cannot use legacy accessors on Blobs with > 4 axes. Check failure stack trace: Aborted (core dumped)

toki2015 commented 7 years ago

This problem was addressed by removing the part at blob.hpp:140-141.

prhbrt commented 7 years ago

I have the same issue with caffe rc3, the problem is caused by

solver = caffe.SGDSolver("solver.prototxt")

Removing those lines from blob.hpp (as mentioned by @toki2015 ) seems like a horrible solution :( @faustomilletari do you know what version of caffe you used? Thank you in advance!

faustomilletari commented 7 years ago

You are not using 3d caffe (on another repo of mine) or you are not using the latest cudnn.

For me it runs smoothly using my 3d caffe

Fausto Milletarì Sent from my iPhone

On 2 Jan 2017, at 06:51, Herbert notifications@github.com wrote:

I have the same issue with caffe rc3, the problem is caused by

solver = caffe.SGDSolver("solver.prototxt") Removing those lines from blob.hpp (as mentioned by @toki2015 ) seems like a horrible solution :( @faustomilletari do you know what version of caffe you used? Thank you in advance!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

prhbrt commented 7 years ago

@faustomilletari, Thank you! I figured it out earlier today, you mentioned it in a different closed issue.

I didn't report back here because I wanted to get your 3d-caffe compiled first, which is taking longer than anticipated. Again, thank you for your quick response!

faustomilletari commented 7 years ago

I hope you are all set now, and that you can start working with this soon.

If somebody wants to help me, meaning review code and correct mistakes I'm open to port vnet to tensorflow.

Regards,

Fausto Milletarì Sent from my iPhone

On 2 Jan 2017, at 11:59, Fausto Milletari fausto.milletari@gmail.com wrote:

You are not using 3d caffe (on another repo of mine) or you are not using the latest cudnn.

For me it runs smoothly using my 3d caffe

Fausto Milletarì Sent from my iPhone

On 2 Jan 2017, at 06:51, Herbert notifications@github.com wrote:

I have the same issue with caffe rc3, the problem is caused by

solver = caffe.SGDSolver("solver.prototxt") Removing those lines from blob.hpp (as mentioned by @toki2015 ) seems like a horrible solution :( @faustomilletari do you know what version of caffe you used? Thank you in advance!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

prhbrt commented 7 years ago

Hi @faustomilletari ,

I would suggest to implement it in Keras, then it is immediately implemented in theano and tensorflow.

Keras has a Merge-layer, that I guess is the key feature to (easily) implement the horizontal gray arrows of your paper.

John1231983 commented 7 years ago

FYI: I also meet the error Cannot use legacy accessors on Blobs with > 4 axes. I fixed it without deleting line 141 and 142 in the blob.hpp. First, you have to install correct version of cuDNN as 5.0 and CUDA 8.0. Then make all -j8 && make pycaffe. Then, you modify the path in ~/.bashrc as

export PYTHONPATH=/home/user/VNet/3D-Caffe/python
export CAFFE_ROOT=/home/user/VNet/3D-Caffe

Note that, it must be done by root permission. Then you run source ~/.bashrc to update. Good luck