I used python code to draw Net defined in prototext file as:
python draw_net.py test.protxt test.png
It fails to draw. It does not show any error but the results test.png file is white blank image file. Can anyone please help me in fixing it? It would really help to design new nets quickly.
I had same problem. Based on this thread, I've managed to solve this by using older Proto syntax as suggested. For instance I had to do this:
Rename layers definition from layers
to layer
. All layer type rename by caffe documentation (or by example proto files) - i.e. layer type: CONVOLUTION
to type: "Convolution"
, etc. Substitute newer syntax:
blobs_lr: 1
blobs_lr: 1
weight_decay: 1
weight_decay: 0
for
param {
name: "conv1_w"
lr_mult: 1
decay_mult: 1
}
param {
name: "conv1_b"
lr_mult: 2
decay_mult: 0
}
Now parsing and new-drawing works just fine. Refer to example .prototxt files in caffe package to get better intuition, how working proto syntax looks like.
Somwhere in mid 2014, Caffe changed their proto definition for extensibility which causes this problem. As a result of this change, all the proto files have to be updated to the newer definition.
To do this, Caffe provides the following tools in the distribute/bin/
or .build_release/tools
directory:
upgrade_net_proto_binary.bin
upgrade_net_proto_text.bin
Here is a simple example of how to convert your proto text file to a newer format:
./upgrade_net_proto_text.bin /path/to/older_proto_file /path/to/newer_ouput_proto_file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With