1

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?

4
  • Possible duplicate of Caffe: how to get the phase of a Python layer? Commented Jan 27, 2016 at 6:17
  • @Shai, I don't think this two are the same question. My question is how to creat a python layer with parameters, for example, how to implement a python fully connected layers? Commented Jan 27, 2016 at 6:27
  • The other question is about writing a python layer with parameters - which is exactly the title of your question. Commented Jan 27, 2016 at 6:29
  • Thank you @Shai, I will edit my question more clearly. Commented Jan 27, 2016 at 6:30

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.