caffe icon indicating copy to clipboard operation
caffe copied to clipboard

"caffe.LayerParameter" has no field named "gradient_scaler_param"

Open aschoenauer-sebag opened this issue 8 years ago • 5 comments

Hello,

I am trying to reproduce the results from your ICML 2015 paper. I have installed caffe and pycaffe from your forked version of it, and run the prepare_experiments scripts. However, when I try ./examples/adaptation/experiments/amazon_to_webcam/scripts/train.sh

I get the following error:

I0908 14:17:37.180552 2839 solver.cpp:91] Creating training net from net file: /mnt/workspace2/ganin_caffe/examples/adaptation/experiments/amazon_to_webcam/protos/train_val.prototxt

[libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 555:25: Message type "caffe.LayerParameter" has no field named "gradient_scaler_param".

F0908 14:17:37.180871 2839 upgrade_proto.cpp:79] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: /mnt/workspace2/ganin_caffe/examples/adaptation/experiments/amazon_to_webcam/protos/train_val.prototxt

(I get the same error with regard to the use of the option cursor: SHUFFLING in the data layers, but it is less bothering as not related to your method per se.)

Would you see how to fix this? Thanks!

aschoenauer-sebag avatar Sep 08 '16 12:09 aschoenauer-sebag

@lalil0u - where you able to solve these issues? I am facing the same problem (both the SHUFFLING and the gradient_scaler_param)

thanks

iariav avatar Jun 06 '17 11:06 iariav

you need to build this forked version of caffe..if caffe builds without any error, the training should start..

aanchal15001 avatar Jun 06 '17 12:06 aanchal15001

thanks. i'm working on windows 10 so i'm using the "windows" branch of caffe and it's not very easy for me to compile a new fork. instead, I made all the necessary changes (added the gradient_scaler_layer hpp and cpp, updated solver.cpp, updated caffe.proto, updated db files etc) according to the "compare changes" of this fork. I also checked that I fulfilled all the steps of the "add a new layer" caffe development guide. I then recompiled and it passed fine, I just have the above issue when I try to train the network..

note that the PR also mentioned that he compiled this fork and still had these issues..

iariav avatar Jun 06 '17 13:06 iariav

As you can see the error says that caffe is not able to find this layer..you might be missing a step..can't comment on that..

I faced the same error, but after compiling this brach of caffe in linux, it was solved!

aanchal15001 avatar Jun 06 '17 14:06 aanchal15001

Hi @iariav , I don't remember how I had solved this - I've moved to Torch since then... Good luck!

aschoenauer-sebag avatar Jun 06 '17 18:06 aschoenauer-sebag