happynear / caffe-windows

Configure Caffe in one hour for Windows users.
Other
1.32k stars 649 forks source link

MIN Pooling #141

Open smithdir101 opened 8 years ago

smithdir101 commented 8 years ago

Hi All,

The Min pooling operator can be achieved by applying convolution by -1 , Max pooling and convolution by -1 again. However, it would be nice to have the MIN pooling operator, so I decided to try to add the MIN operator in the pooling layer but since it did not work for me. I happy to have your help. I follow this link: https://github.com/BVLC/caffe/pull/3998/commits/51d38a4b34bddffb00871ac8d8fd3020b7309132 Note that this links referred to files that do not exist in the current version of Caffe I am using, therefore I searched for similar codes in my current Caffe and modified the files, and these are:

Link – file name  Corresponding file name

1 include/caffe/vision_layers.hpp include/caffe/layer/pooling_layer.hpp include/caffe/util/cudnn.hpp 2 src/caffe/layers/pooling_layer.cpp src/caffe/layers/pooling_layer.cpp 3 src/caffe/layers/pooling_layer.cu src/caffe/layers/pooling_layer.cu 4 src/caffe/proto/caffe.proto src/caffe/proto/caffe.proto

Once I compiled I got few errors and I modified few addition places: spp_layer.cpp caffe.pb layer_factory.cpp

**Then I compiled successfully the entire solution. At run I got this error:

I0602 13:47:15.095408 10676 solver.cpp:91] Creating training net from net file: run_siam_train_val_1.prototxt [libprotobuf ERROR D:\ThirdPartyLibrary\protobuf\src\google\protobuf\text_format.cc:291] Error parsing text-format caffe.NetParameter: 4176:5: Unknown enumeration value of "MIN" for field "pool". F0602 13:47:15.098409 10676 upgrade_proto.cpp:68] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: run_siam_train_val_1.prototxt * Check failure stack trace: ***

The caffe version I use I download on Feb-04_2016.

My modified files are attached: If someone can help me it would be great.

Thanks Jhon

smithdir101 commented 8 years ago

Hi All, I forgot to attacghed the files.

MIN.txt

Please rename the file to MIN.zip and then you can unzipped it.

Jhon PS I have a problme o floading the zip file.