1

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?

Alejandro Simkievich
  • 3,512
  • 4
  • 33
  • 49

1 Answers1

2

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

Shai
  • 111,146
  • 38
  • 238
  • 371