I am creating a network using Caffe, for which I need to define my own layer. I would like to use the Python
layer for this.
My layer will contain some learned parameters. From this answer, I am told that I will need to create a blob vector for this.
- Is there any specification that this blob will need to follow, such as constraints in dimensions, etc.? Irrespective of what my layer does, can I create a blob of one dimension, and use any element, one each, of the blob for any computation in the layer?
- What does the
diff
of a blob mean? From what I understand, thediff
ofbottom
is the gradient at the current layer, andtop
for the previous layer. However, what exactly is happening here? - When do these parameters get trained? Does this need to be done manually in the layer definition?
I have seen the examples in test_python_layer.py
, but most of them do not have any parameters.