Unknown enumeration value of "PRELU",

247 views
Skip to first unread message

Elian Laura

unread,
May 25, 2016, 11:32:35 AM5/25/16
to Caffe Users

Hello,
i don't understand why PRELU is not recognized when i execute the detection with my caffemodel.
This is part of my prototxt:


layers {
  name: "pool2"
  type: POOLING
  bottom: "conv2"
  top: "pool2"
  pooling_param { # CAMBIAR
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layers {
  name: "ip1"
  type: INNER_PRODUCT
  bottom: "pool2"
  top: "ip1"
  blobs_lr: 1
  blobs_lr: 2
  inner_product_param {
    num_output: 500
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}

layers {
  name: "prelu"
  type: PRELU
  bottom: "ip1"
  top: "ip1"
}

And the error throwed is :

WARNING: Logging before InitGoogleLogging() is written to STDERR
I0525 10:29:02.663429 30855 main.cpp:33] Using GPU
[libprotobuf ERROR google/protobuf/text_format.cc:274]
Error parsing text-format caffe.NetParameter: 98:3: Unknown enumeration value of "PRELU" for field "type".


F0525 10:29:03.654397 30855 upgrade_proto.cpp:68] Check failed: ReadProtoFromTextFile(param_file, param)
Failed to parse NetParameter file: ./examples/mnist/lenet_train_test.prototxt
*** Check failure stack trace: ***
Press <RETURN> to close this window...



Please , i need to test with PRELU , why it is happen? 


Regards

Pedro Herruzo

unread,
May 25, 2016, 6:01:59 PM5/25/16
to Caffe Users
Dear Elian,

I had a similar error, it seem to be that the new version of caffe doesn't accept upper-case anymore. So, if you need that type, just try to write it in lower-case. If you are lucky, it will be solved. Otherwise I have no clue.

Also, if it luckily solves your problem, you should have the same problem with the other types.

Kind regards,
Pedro

Elian Laura

unread,
May 25, 2016, 10:50:16 PM5/25/16
to Caffe Users
Hi Pedro,
I justo solved the problem, is about the format, when i use layers with 's' the type should be in upper-case, but when i use layer without 's', the type is in lower-case and with quotation mark.
I changed only this layer :

layers {
  name: "prelu"
  type: PRELU
  bottom: "ip1"
  top: "ip1"
}


to

layer {
 name: "prelu1"
 type: "PReLU"          
 bottom: "ip1"
 top: "ip1"
}


Thanks,

Developer

unread,
Jul 27, 2017, 7:15:20 PM7/27/17
to Caffe Users
I can not understand why the accuracy remains zero and the loss remains fixed, can you give me a proposal to solve this problem (I work on the detection of text with the model vgg16)
Reply all
Reply to author
Forward
0 new messages