问题
I want to learn how to write caffe python layers.
But I only find examples about very simple layers like pyloss.
How to write python caffe with trainable parameters?
For example, how to write a fully connected python layer?
回答1:
Caffe stores the layer's trainable parameters as a vector of blobs
. By default this vector is empty and it is up to you to add parameters blobs to it in the setup
of the layer. There is a simple example for a layer with parameters in test_python_layer.py.
See this post for more information about "Python"
layers in caffe.
来源:https://stackoverflow.com/questions/35027152/how-to-write-caffe-python-layer-with-trainable-parameters