Bekeley caffe command line interface

不羁的心 提交于 2019-12-23 03:36:08

问题


if you are using a custom python layer - and assuming you wrote the class correctly in python - let's say the name of the class is "my_ugly_custom_layer"; and you execute caffe in the linux command line interface,

how do you make sure that caffe knows how to find the file where you wrote the class for your layer? do you just place the .py file in the same directory as the train.prototxt?

or

if you wrote a custom class in python you need to use the python wrapper interface?


回答1:


Your python layer has two parameters in the prototxt: layer: where you define the python class name implementing your layer, and moduule: where you define the .py file name where the layer class is implemented.
When you run caffe (either from command line or via python interface) you need to make sure your module is in the PYTHONPATH



来源:https://stackoverflow.com/questions/45942883/bekeley-caffe-command-line-interface

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