how to write caffe python layer with trainable parameters?

蓝咒 提交于 2019-12-24 13:37:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!