Unknown layer type (cropping) in windows caffe

I want to use the following convolutional neural network:

http://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/

using caffe built from https://github.com/BVLC/caffe/tree/windows

for Windows 10 with visual studio 2013, CUDA 7.5, cudNN 4 and python support.

Now, when I call one of the two networks that come with

net = caffe.Net('xyz.prototxt', 'xyz.caffemodel', caffe.TEST)

I get the following error:

 Error parsing text-format caffe.NetParameter: 43:85: Unknown enumeration value of "CROP" for field "type".

Line 43 of the network is as follows:

layers { bottom: 'd3c' bottom: 'u3a' top: 'd3cc'  name: 'crop_d3c-d3cc'  type: CROP }

I looked online and some people seem to be facing the same error message. However, I could not find any solutions.

Now my question is: how do I get rid of this error?

Help is greatly appreciated!

EDIT:

The .prototxt change proposed by Dale Song fixed this error, but led to yet another:

[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text-format caffe.NetParameter: 10:102: Message type "caffe.LayerParameter" has no field named "blobs_lr".

,

blobs_lr: 1 weight_decay: 1 blobs_lr: 2 weight_decay: 0

 param {lr_mult: 1 decay_mult: 1} param {lr_mult: 2 decay_mult: 0}

.prototxt, .

!

+4
1

:

net.prototxt :

layers { ... type: CROP }

layer { ... type: "Crop" }

, :

layer { ... type: "TypeString" },

TypeString :

  • REGISTER_LAYER_CLASS(some_layer_name) some_layer_name_layer.cpp. , REGISTER_LAYER_CLASS(Data) data_layer.cpp , TypeString Data net.prototxt.
  • REGISTER_LAYER_CREATOR(some_layer_name, GetSomeLayer) layer_factory.cpp. , REGISTER_LAYER_CREATOR(Convolution, GetConvolutionLayer) , TypeString Convolution net.prototxt.

:

:

layers { ... type: SOMELAYERNAME }.

, V1LayerParameter caffe.proto, , crop.

, , enum LayerType of V1LayerParameter crop.

, :

layer { ... type: "TypeString" }

TypeString .


1

:

:

Error parsing text-format caffe.xxxParameter: ...

, , xxx.prototxt , caffe.proto ( ).

+3

Source: https://habr.com/ru/post/1654225/


All Articles